@cline/core 0.0.95 → 0.2.0-nightly.1793312794

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 (175) hide show
  1. package/dist/ClineCore.d.ts +6 -1
  2. package/dist/account/rpc.d.ts +3 -1
  3. package/dist/account/types.d.ts +2 -0
  4. package/dist/artifacts/cloud/fetch.d.ts +8 -0
  5. package/dist/artifacts/cloud/publish.d.ts +6 -0
  6. package/dist/artifacts/publish.d.ts +30 -0
  7. package/dist/cline-core/runtime-services.d.ts +4 -2
  8. package/dist/cloud/computer-use-prompt.d.ts +9 -0
  9. package/dist/cloud/controller.d.ts +26 -4
  10. package/dist/cloud/hub-client.d.ts +53 -0
  11. package/dist/cloud/hub-protocol.d.ts +32 -0
  12. package/dist/cloud/index.d.ts +5 -0
  13. package/dist/cloud/index.js +34 -17
  14. package/dist/cloud/types.d.ts +4 -1
  15. package/dist/extensions/context/compaction-shared.d.ts +1 -0
  16. package/dist/extensions/context/compaction.d.ts +7 -0
  17. package/dist/extensions/context/summarize-conversation.d.ts +7 -0
  18. package/dist/extensions/context/summary-generation.d.ts +14 -0
  19. package/dist/extensions/mcp/apps.d.ts +16 -0
  20. package/dist/extensions/mcp/client.d.ts +1 -0
  21. package/dist/extensions/mcp/index.d.ts +5 -1
  22. package/dist/extensions/mcp/manager.d.ts +2 -1
  23. package/dist/extensions/mcp/session-apps.d.ts +28 -0
  24. package/dist/extensions/mcp/types.d.ts +22 -0
  25. package/dist/extensions/plugin/plugin-command-origin.d.ts +8 -0
  26. package/dist/extensions/plugin/plugin-registry.d.ts +1 -0
  27. package/dist/extensions/plugin/plugin-runtime.d.ts +7 -0
  28. package/dist/hub/client/index.d.ts +6 -0
  29. package/dist/hub/client/managed-hub-build-watcher.d.ts +2 -0
  30. package/dist/hub/client/plugin-commands.d.ts +4 -0
  31. package/dist/hub/client/session-client.d.ts +2 -0
  32. package/dist/hub/daemon/entry.js +248 -229
  33. package/dist/hub/daemon/index.d.ts +2 -0
  34. package/dist/hub/index.d.ts +1 -0
  35. package/dist/hub/index.js +238 -219
  36. package/dist/hub/runtime-host/hub-runtime-host.d.ts +6 -0
  37. package/dist/hub/server/cloud-session-service.d.ts +52 -0
  38. package/dist/hub/server/handlers/capability-handlers.d.ts +18 -1
  39. package/dist/hub/server/handlers/context.d.ts +13 -2
  40. package/dist/hub/server/handlers/mcp-apps-handlers.d.ts +5 -0
  41. package/dist/hub/server/handlers/session-handlers.d.ts +4 -0
  42. package/dist/hub/server/hub-server-options.d.ts +3 -0
  43. package/dist/hub/server/hub-server-transport.d.ts +2 -0
  44. package/dist/index.d.ts +10 -5
  45. package/dist/index.js +284 -258
  46. package/dist/plugin-runtime/node_modules/@cline/agents/dist/index.js +76 -0
  47. package/dist/plugin-runtime/node_modules/@cline/agents/package.json +1 -0
  48. package/dist/plugin-runtime/node_modules/@cline/core/dist/ai-sdk-bdvd54cj.js +1 -0
  49. package/dist/plugin-runtime/node_modules/@cline/core/dist/anthropic-d88t4w67.js +1 -0
  50. package/dist/plugin-runtime/node_modules/@cline/core/dist/bedrock-4rh6dw0e.js +1 -0
  51. package/dist/plugin-runtime/node_modules/@cline/core/dist/cline-dex049wz.js +1 -0
  52. package/dist/plugin-runtime/node_modules/@cline/core/dist/cloud/index.js +38 -0
  53. package/dist/plugin-runtime/node_modules/@cline/core/dist/community-adrseffv.js +1 -0
  54. package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-embedding-model-strategy-SAVQFBF4-vf44v1q1.js +1 -0
  55. package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-language-model-strategy-BPQO66W7-np6pavev.js +1 -0
  56. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-1xg0n8py.js +1 -0
  57. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-2h2811k3.js +1 -0
  58. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-918h9zb6.js +2 -0
  59. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-9g9qz8kw.js +2 -0
  60. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-8p52y0t4.js +1 -0
  61. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-cr4wnstr.js +1 -0
  62. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-aa72jh2v.js +1 -0
  63. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-k2y10eep.js +1 -0
  64. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-1hvm2h6v.js +1 -0
  65. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-7nqbajdc.js +1 -0
  66. package/dist/plugin-runtime/node_modules/@cline/core/dist/google-nqn5r579.js +1 -0
  67. package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/daemon/entry.js +1166 -0
  68. package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/index.js +1153 -0
  69. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-0ahmqye5.js +2 -0
  70. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-1jwj53tz.js +2 -0
  71. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-3qy7846d.js +14 -0
  72. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-418gvd4a.js +2 -0
  73. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4etvmc8g.js +2 -0
  74. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4pm9q9we.js +1 -0
  75. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4tgv599k.js +2 -0
  76. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-5hwscy9s.js +15 -0
  77. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-6dpcn5cw.js +9 -0
  78. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-7ycwqbm0.js +1 -0
  79. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-8qjtgvqw.js +9 -0
  80. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-8zb5grad.js +1210 -0
  81. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-94jdgxt6.js +2 -0
  82. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-9g67p34k.js +2 -0
  83. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-a9d2sjh0.js +85 -0
  84. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-agemt17a.js +3 -0
  85. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bhf7enwn.js +1 -0
  86. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bnwxdgvg.js +1 -0
  87. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-brjxtvsh.js +4 -0
  88. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bvb7f701.js +1 -0
  89. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bwet95hr.js +2 -0
  90. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-cadyf2yp.js +14 -0
  91. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-cxfnnrmh.js +9 -0
  92. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-cyyvppz9.js +6 -0
  93. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-d4pbedxj.js +137 -0
  94. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ddwn220p.js +12 -0
  95. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-edf1hmcw.js +62 -0
  96. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ejyd73x5.js +1 -0
  97. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-f25bf131.js +4 -0
  98. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-f4rfmj6q.js +3 -0
  99. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-fet3kwk6.js +1 -0
  100. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ffna8yzn.js +121 -0
  101. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-g2y6ptdc.js +213 -0
  102. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ge184xvn.js +6 -0
  103. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-gevnedsc.js +13 -0
  104. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-hkmarmve.js +190 -0
  105. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-kqacxn3s.js +39 -0
  106. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m3gtj35r.js +14 -0
  107. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-neczvge6.js +21 -0
  108. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-p5k5hnam.js +75 -0
  109. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-sdvqs19c.js +20 -0
  110. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-t75m2pgm.js +146 -0
  111. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v4-qqb2kabr.js +1 -0
  112. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v6mehmme.js +12 -0
  113. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v80fh3x3.js +16 -0
  114. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-vd605jwp.js +2 -0
  115. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-vryppqt1.js +1 -0
  116. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-w55v4n1n.js +2 -0
  117. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-w9n2kgjk.js +140 -0
  118. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-yjbp9r76.js +142 -0
  119. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ztb3cjfh.js +3 -0
  120. package/dist/plugin-runtime/node_modules/@cline/core/dist/index.js +1 -0
  121. package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-static-kj4rdeey.js +473 -0
  122. package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-y9tt7gmq.js +1 -0
  123. package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-stream-telemetry-bg81k3qh.js +1 -0
  124. package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-telemetry-tkbfbx5w.js +1 -0
  125. package/dist/plugin-runtime/node_modules/@cline/core/dist/mistral-mkw95amh.js +1 -0
  126. package/dist/plugin-runtime/node_modules/@cline/core/dist/multipart-parser-9z19cm6q.js +2 -0
  127. package/dist/plugin-runtime/node_modules/@cline/core/dist/ollama-sjp09b7p.js +1 -0
  128. package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-1eyn4hw0.js +1 -0
  129. package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-compatible-f99c7syq.js +1 -0
  130. package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-embedding-model-strategy-GT27AFII-19936r1a.js +1 -0
  131. package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-language-model-strategy-YEQPUCOT-eavx3zc3.js +1 -0
  132. package/dist/plugin-runtime/node_modules/@cline/core/dist/services/feature-flags/posthog.js +2 -0
  133. package/dist/plugin-runtime/node_modules/@cline/core/dist/services/telemetry/index.js +1 -0
  134. package/dist/plugin-runtime/node_modules/@cline/core/dist/token-04d0mwe8.js +1 -0
  135. package/dist/plugin-runtime/node_modules/@cline/core/dist/token-util-mt7pvm61.js +1 -0
  136. package/dist/plugin-runtime/node_modules/@cline/core/dist/vertex-6armtc3s.js +1 -0
  137. package/dist/plugin-runtime/node_modules/@cline/core/package.json +1 -0
  138. package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.browser.js +16 -0
  139. package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.js +1 -0
  140. package/dist/plugin-runtime/node_modules/@cline/llms/package.json +1 -0
  141. package/dist/plugin-runtime/node_modules/@cline/sdk/dist/index.js +1 -0
  142. package/dist/plugin-runtime/node_modules/@cline/sdk/package.json +1 -0
  143. package/dist/plugin-runtime/node_modules/@cline/shared/dist/automation/index.js +57 -0
  144. package/dist/plugin-runtime/node_modules/@cline/shared/dist/db/index.js +127 -0
  145. package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.browser.js +110 -0
  146. package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.js +1 -0
  147. package/dist/plugin-runtime/node_modules/@cline/shared/dist/node.js +1 -0
  148. package/dist/plugin-runtime/node_modules/@cline/shared/dist/remote-config/index.js +68 -0
  149. package/dist/plugin-runtime/node_modules/@cline/shared/dist/storage/index.js +1 -0
  150. package/dist/plugin-runtime/node_modules/@cline/shared/dist/types/index.js +1 -0
  151. package/dist/plugin-runtime/node_modules/@cline/shared/package.json +1 -0
  152. package/dist/plugin-runtime/package.json +1 -0
  153. package/dist/{extensions → plugin-runtime}/plugin-sandbox-bootstrap.js +129 -129
  154. package/dist/remote/remote-environments.d.ts +1 -0
  155. package/dist/runtime/config/agent-runtime-config-builder.d.ts +2 -0
  156. package/dist/runtime/host/local-runtime-host.d.ts +10 -0
  157. package/dist/runtime/host/runtime-host.d.ts +6 -0
  158. package/dist/runtime/orchestration/runtime-oauth-token-manager.d.ts +3 -0
  159. package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +10 -1
  160. package/dist/runtime/orchestration/session-runtime.d.ts +2 -0
  161. package/dist/runtime/tools/subprocess-sandbox.d.ts +22 -0
  162. package/dist/services/cloud-handoff/git-preparation.d.ts +22 -0
  163. package/dist/services/global-settings.d.ts +6 -0
  164. package/dist/services/llms/cline-recommended-models.d.ts +2 -0
  165. package/dist/services/local-runtime-bootstrap.d.ts +1 -0
  166. package/dist/services/plugin-command-api.d.ts +47 -0
  167. package/dist/services/plugin-commands.d.ts +25 -27
  168. package/dist/services/skills-cli.d.ts +2 -0
  169. package/dist/services/telemetry/core-events.d.ts +26 -0
  170. package/dist/services/telemetry/index.js +1 -1
  171. package/dist/services/telemetry/run-health.d.ts +40 -0
  172. package/dist/services/telemetry/stall-signals.d.ts +12 -0
  173. package/dist/types/config.d.ts +1 -0
  174. package/dist/types/session.d.ts +7 -0
  175. package/package.json +6 -5
@@ -0,0 +1,213 @@
1
+ import{X}from"./index-d4pbedxj.js";import{mm,Ct}from"./index-ge184xvn.js";import{yc,xc}from"./index-brjxtvsh.js";import{N,ni,It,we,b,u,l}from"./index-w9n2kgjk.js";import{v,i,c,Ot,$r,Ie,_,sa,ih,g,El,Rl,Al,Py,ce,qr,kc,Sp,Ep,nh,Ic,Rp,Ap,Ol,Op,Cp,Wp,Fp,jp,Li,an,$p,e,n,r,m,t,p,d,s,a,J}from"./index-edf1hmcw.js";var Td=i(function(o1){Object.defineProperty(o1,"__esModule",{value:!0});o1.flatten=void 0;o1.flat=E$;o1.unique=T$;o1.last=k$;o1.first=O$;o1.splitInChunks=I$;o1.transformVariadicArgumentToArray=R$;o1.zip=P$;o1.partition=D$;o1.filterDuplicates=r1;o1.filterDuplicatesRight=B$;function E$(o){return o.reduce((f,h)=>[...f,...h],[])}function T$(o){return Array.from(new Set(o))}function k$(o){return o.length?o[o.length-1]:void 0}function O$(o){return o[0]}function I$(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 R$(o,f){if(Array.isArray(o))return[...o,...f];return o?[o,...f]:[...f]}var A$=(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()};o1.flatten=A$;function P$(o,f){return(o.length>f.length?o:f).reduce((y,x,z)=>{let C=[];if(o.length>z)C.push(o[z]);if(f.length>z)C.push(f[z]);return[...y,...C]},[])}function D$(o,f){return o.reduce(([h,y],x)=>f(x)?[[...h,x],y]:[h,[...y,x]],[[],[]])}function r1(o,f=(h,y)=>h===y){return o.filter((h,y)=>!o.slice(0,y).find((x)=>f(h,x)))}function B$(o,f=(h,y)=>h===y){return r1(o.reverse(),f).reverse()}});var ng=i(function(a1){Object.defineProperty(a1,"__esModule",{value:!0});a1.encodeBase64=G$;a1.trimLeft=i1;a1.trimRight=s1;a1.trim=K$;a1.removeFileExtension=W$;function G$(o){return Buffer.from(o).toString("base64")}function i1(o){let f=o.split(`
2
+ `),h=f[0].trimStart();if(!h)f.shift();else f[0]=h;return f.join(`
3
+ `)}function s1(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 K$(o){return s1(i1(o))}function W$(o){return o.includes(".")?o.split(".").slice(0,-1).join("."):o}});var l1=i(function(c1){Object.defineProperty(c1,"__esModule",{value:!0});c1.codeBlock=rV;var eV=Td(),tV=ng();function rV(o,...f){let h=o.slice(0,-1).map((C)=>{let w=oV(C);return w.length===C.length?C:`${w}
6
+ `});h.push(o[o.length-1]);let y=o.slice(0,-1).map((C)=>{let w=C.split(`
7
+ `).pop();return!w.trim()?w:""}),x=f.map((C,w)=>(""+C).split(`
8
+ `).map((S)=>y[w]+S).join(`
9
+ `)),z=eV.zip(h,x);return tV.trim(z.join(""))}function oV(o){let f=o.split(`
10
+ `);if(!f[f.length-1].trim())f=f.slice(0,-1);return f.join(`
11
+ `)}});var uo=i(function(tIe,u1){class ig 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,ig)}}u1.exports=(o)=>{if(o.length>2)throw new ig(o);function f(y={}){this.options=y}f.prototype.transform=o;function h(y){return new f(y)}return h.Format=f,h}});var h1=i(function(rIe,f1){var p1={};f1.exports=p1;var d1={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(d1).forEach(function(o){var f=d1[o],h=p1[o]=[];h.open="\x1B["+f[0]+"m",h.close="\x1B["+f[1]+"m"})});var g1=i(function(oIe,m1){m1.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 b1=i(function(nIe,y1){var iV=c("os"),en=g1(),Xr=process.env,ga=void 0;if(en("no-color")||en("no-colors")||en("color=false"))ga=!1;else if(en("color")||en("colors")||en("color=true")||en("color=always"))ga=!0;if("FORCE_COLOR"in Xr)ga=Xr.FORCE_COLOR.length===0||parseInt(Xr.FORCE_COLOR,10)!==0;function sV(o){if(o===0)return!1;return{level:o,hasBasic:!0,has256:o>=2,has16m:o>=3}}function aV(o){if(ga===!1)return 0;if(en("color=16m")||en("color=full")||en("color=truecolor"))return 3;if(en("color=256"))return 2;if(o&&!o.isTTY&&ga!==!0)return 0;var f=ga?1:0;if(process.platform==="win32"){var h=iV.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 Xr){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(x){return x in Xr})||Xr.CI_NAME==="codeship")return 1;return f}if("TEAMCITY_VERSION"in Xr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Xr.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in Xr){var y=parseInt((Xr.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Xr.TERM_PROGRAM){case"iTerm.app":return y>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(Xr.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(Xr.TERM))return 1;if("COLORTERM"in Xr)return 1;if(Xr.TERM==="dumb")return f;return f}function sg(o){var f=aV(o);return sV(f)}y1.exports={supportsColor:sg,stdout:sg(process.stdout),stderr:sg(process.stderr)}});var x1=i(function(iIe,v1){v1.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(z){z=z.toLowerCase();var C=x[z]||[" "],w=Math.floor(Math.random()*C.length);if(typeof x[z]<"u")y+=x[z][w];else y+=z}),y}});var z1=i(function(sIe,_1){_1.exports=function(f,h){f=f||" he is here ";var y={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},x=[].concat(y.up,y.down,y.mid);function z(S){var E=Math.floor(Math.random()*S);return E}function C(S){var E=!1;return x.filter(function(T){E=T===S}),E}function w(S,E){var T="",k,O;E=E||{},E.up=typeof E.up<"u"?E.up:!0,E.mid=typeof E.mid<"u"?E.mid:!0,E.down=typeof E.down<"u"?E.down:!0,E.size=typeof E.size<"u"?E.size:"maxi",S=S.split("");for(O in S){if(C(O))continue;switch(T=T+S[O],k={up:0,down:0,mid:0},E.size){case"mini":k.up=z(8),k.mid=z(2),k.down=z(8);break;case"maxi":k.up=z(16)+3,k.mid=z(4)+1,k.down=z(64)+3;break;default:k.up=z(8)+1,k.mid=z(6)/2,k.down=z(8)+1;break}var R=["up","mid","down"];for(var I in R){var A=R[I];for(var j=0;j<=k[A];j++)if(E[A])T=T+y[A][z(y[A].length)]}}return T}return w(f,h)}});var w1=i(function(aIe,C1){C1.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 E1=i(function(cIe,S1){S1.exports=function(o){return function(f,h,y){return h%2===0?f:o.inverse(f)}}});var k1=i(function(lIe,T1){T1.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 I1=i(function(uIe,O1){O1.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 B1=i(function(pIe,D1){var tt={};D1.exports=tt;tt.themes={};var cV=c("util"),ss=tt.styles=h1(),R1=Object.defineProperties,lV=new RegExp(/[\r\n]+/g);tt.supportsColor=b1().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 dIe=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},uV=/[|\\{}()[\]^$+*?.]/g,dV=function(o){if(typeof o!=="string")throw TypeError("Expected a string");return o.replace(uV,"\\$&")};function A1(o){var f=function h(){return fV.apply(h,arguments)};return f._styles=o,f.__proto__=pV,f}var P1=function(){var o={};return ss.grey=ss.gray,Object.keys(ss).forEach(function(f){ss[f].closeRe=new RegExp(dV(ss[f].close),"g"),o[f]={get:function(){return A1(this._styles.concat(f))}}}),o}(),pV=R1(function(){},P1);function fV(){var o=Array.prototype.slice.call(arguments),f=o.map(function(C){if(C!=null&&C.constructor===String)return C;else return cV.inspect(C)}).join(" ");if(!tt.enabled||!f)return f;var h=f.indexOf(`
15
+ `)!=-1,y=this._styles,x=y.length;while(x--){var z=ss[y[x]];if(f=z.open+f.replace(z.closeRe,z.open)+z.close,h)f=f.replace(lV,function(C){return z.close+C+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 z in o[h])x=tt[o[h][z]](x);return x}return tt[o[h]](y)}})(f)};function hV(){var o={};return Object.keys(P1).forEach(function(f){o[f]={get:function(){return A1([f])}}}),o}var mV=function(f,h){var y=h.split("");return y=y.map(f),y.join("")};tt.trap=x1();tt.zalgo=z1();tt.maps={};tt.maps.america=w1()(tt);tt.maps.zebra=E1()(tt);tt.maps.rainbow=k1()(tt);tt.maps.random=I1()(tt);for(ag in tt.maps)(function(o){tt[o]=function(f){return mV(tt.maps[o],f)}})(ag);var ag;R1(tt,hV())});var cg=i(function(fIe,L1){var gV=B1();L1.exports=gV});var N1=i(function(yV){yV.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};yV.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var j1=i(function(xV){xV.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};xV.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var M1=i(function(CV){CV.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};CV.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var q1=i(function(kd){Object.defineProperty(kd,"cli",{value:N1()});Object.defineProperty(kd,"npm",{value:j1()});Object.defineProperty(kd,"syslog",{value:M1()})});var cr=i(function(Hc){Object.defineProperty(Hc,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Hc,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Hc,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Hc,"configs",{value:q1()})});var Id=i(function(vIe,Od){var dg=cg(),{LEVEL:lg,MESSAGE:ug}=cr();dg.enabled=!0;var F1=/\s+/;class tn{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]=F1.test(o[y])?o[y].split(F1):o[y],h),{});return tn.allColors=Object.assign({},tn.allColors||{},f),tn.allColors}addColors(o){return tn.addColors(o)}colorize(o,f,h){if(typeof h>"u")h=f;if(!Array.isArray(tn.allColors[o]))return dg[tn.allColors[o]](h);for(let y=0,x=tn.allColors[o].length;y<x;y++)h=dg[tn.allColors[o][y]](h);return h}transform(o,f){if(f.all&&typeof o[ug]==="string")o[ug]=this.colorize(o[lg],o.level,o[ug]);if(f.level||f.all||!f.message)o.level=this.colorize(o[lg],o.level);if(f.all||f.message)o.message=this.colorize(o[lg],o.level,o.message);return o}}Od.exports=(o)=>new tn(o);Od.exports.Colorizer=Od.exports.Format=tn});var $1=i(function(xIe,U1){var{Colorizer:EV}=Id();U1.exports=(o)=>(EV.addColors(o.colors||o),o)});var H1=i(function(_Ie,V1){var TV=uo();V1.exports=TV((o)=>(o.message=` ${o.message}`,o))});var W1=i(function(zIe,K1){var kV=uo(),{LEVEL:G1,MESSAGE:pg}=cr();K1.exports=kV((o,{stack:f,cause:h})=>{if(o instanceof Error){let x=Object.assign({},o,{level:o.level,[G1]:o[G1]||o.level,message:o.message,[pg]:o[pg]||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[pg]=y.message,f)o.stack=y.stack;if(h)o.cause=y.cause;return o})});var hg=i(function(CIe,Rd){var{configs:OV,LEVEL:J1,MESSAGE:fg}=cr();class ya{constructor(o={levels:OV.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[J1]]}${o.message}`,o[fg])o[fg]=`${this.paddings[o[J1]]}${o[fg]}`;return o}}Rd.exports=(o)=>new ya(o);Rd.exports.Padder=Rd.exports.Format=ya});var Z1=i(function(wIe,gg){var{Colorizer:IV}=Id(),{Padder:RV}=hg(),{configs:AV,MESSAGE:PV}=cr();class mg{constructor(o={}){if(!o.levels)o.levels=AV.cli.levels;this.colorizer=new IV(o),this.padder=new RV(o),this.options=o}transform(o,f){return this.colorizer.transform(this.padder.transform(o,f),f),o[PV]=`${o.level}:${o.message}`,o}}gg.exports=(o)=>new mg(o);gg.exports.Format=mg});var X1=i(function(SIe,yg){var BV=uo();function Y1(o){if(!o.every(LV))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 LV(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}yg.exports=(...o)=>{let f=BV(Y1(o)),h=f();return h.Format=f.Format,h};yg.exports.cascade=Y1});var ba=i(function(EIe,tC){var{hasOwnProperty:Gc}=Object.prototype,cs=xg();cs.configure=xg;cs.stringify=cs;cs.default=cs;EIe.stringify=cs;EIe.configure=xg;tC.exports=cs;var NV=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function fi(o){if(o.length<5000&&!NV.test(o))return`"${o}"`;return JSON.stringify(o)}function bg(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 jV=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function vg(o){return jV.call(o)!==void 0&&o.length!==0}function Q1(o,f,h){if(o.length<h)h=o.length;let y=f===","?"":" ",x=`"0":${y}${o[0]}`;for(let z=1;z<h;z++)x+=`${f}"${z}":${y}${o[z]}`;return x}function MV(o){if(Gc.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 qV(o){let f;if(Gc.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 FV(o,f){let h;if(Gc.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 eC(o,f){let h;if(Gc.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 UV(o){let f=new Set;for(let h of o)if(typeof h==="string"||typeof h==="number")f.add(String(h));return f}function $V(o){if(Gc.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 xg(o){o={...o};let f=$V(o);if(f){if(o.bigint===void 0)o.bigint=!1;if(!("circularValue"in o))o.circularValue=Error}let h=MV(o),y=FV(o,"bigint"),x=qV(o),z=typeof x==="function"?x:void 0,C=eC(o,"maximumDepth"),w=eC(o,"maximumBreadth");function S(R,I,A,j,P,F){let q=I[R];if(typeof q==="object"&&q!==null&&typeof q.toJSON==="function")q=q.toJSON(R);switch(q=j.call(I,R,q),typeof q){case"string":return fi(q);case"object":{if(q===null)return"null";if(A.indexOf(q)!==-1)return h;let W="",ee=",",te=F;if(Array.isArray(q)){if(q.length===0)return"[]";if(C<A.length+1)return'"[Array]"';if(A.push(q),P!=="")F+=P,W+=`
17
+ ${F}`,ee=`,
18
+ ${F}`;let Ae=Math.min(q.length,w),He=0;for(;He<Ae-1;He++){let Pe=S(String(He),q,A,j,P,F);W+=Pe!==void 0?Pe:"null",W+=ee}let Le=S(String(He),q,A,j,P,F);if(W+=Le!==void 0?Le:"null",q.length-1>w){let Pe=q.length-w-1;W+=`${ee}"... ${as(Pe)} not stringified"`}if(P!=="")W+=`
19
+ ${te}`;return A.pop(),`[${W}]`}let le=Object.keys(q),he=le.length;if(he===0)return"{}";if(C<A.length+1)return'"[Object]"';let ye="",ke="";if(P!=="")F+=P,ee=`,
20
+ ${F}`,ye=" ";let me=Math.min(he,w);if(x&&!vg(q))le=bg(le,z);A.push(q);for(let Ae=0;Ae<me;Ae++){let He=le[Ae],Le=S(He,q,A,j,P,F);if(Le!==void 0)W+=`${ke}${fi(He)}:${ye}${Le}`,ke=ee}if(he>w){let Ae=he-w;W+=`${ke}"...":${ye}"${as(Ae)} not stringified"`,ke=ee}if(P!==""&&ke.length>1)W=`
21
+ ${F}${W}
22
+ ${te}`;return A.pop(),`{${W}}`}case"number":return isFinite(q)?String(q):f?f(q):"null";case"boolean":return q===!0?"true":"false";case"undefined":return;case"bigint":if(y)return String(q);default:return f?f(q):void 0}}function E(R,I,A,j,P,F){if(typeof I==="object"&&I!==null&&typeof I.toJSON==="function")I=I.toJSON(R);switch(typeof I){case"string":return fi(I);case"object":{if(I===null)return"null";if(A.indexOf(I)!==-1)return h;let q=F,W="",ee=",";if(Array.isArray(I)){if(I.length===0)return"[]";if(C<A.length+1)return'"[Array]"';if(A.push(I),P!=="")F+=P,W+=`
23
+ ${F}`,ee=`,
24
+ ${F}`;let he=Math.min(I.length,w),ye=0;for(;ye<he-1;ye++){let me=E(String(ye),I[ye],A,j,P,F);W+=me!==void 0?me:"null",W+=ee}let ke=E(String(ye),I[ye],A,j,P,F);if(W+=ke!==void 0?ke:"null",I.length-1>w){let me=I.length-w-1;W+=`${ee}"... ${as(me)} not stringified"`}if(P!=="")W+=`
25
+ ${q}`;return A.pop(),`[${W}]`}A.push(I);let te="";if(P!=="")F+=P,ee=`,
26
+ ${F}`,te=" ";let le="";for(let he of j){let ye=E(he,I[he],A,j,P,F);if(ye!==void 0)W+=`${le}${fi(he)}:${te}${ye}`,le=ee}if(P!==""&&le.length>1)W=`
27
+ ${F}${W}
28
+ ${q}`;return A.pop(),`{${W}}`}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 T(R,I,A,j,P){switch(typeof I){case"string":return fi(I);case"object":{if(I===null)return"null";if(typeof I.toJSON==="function"){if(I=I.toJSON(R),typeof I!=="object")return T(R,I,A,j,P);if(I===null)return"null"}if(A.indexOf(I)!==-1)return h;let F=P;if(Array.isArray(I)){if(I.length===0)return"[]";if(C<A.length+1)return'"[Array]"';A.push(I),P+=j;let ye=`
29
+ ${P}`,ke=`,
30
+ ${P}`,me=Math.min(I.length,w),Ae=0;for(;Ae<me-1;Ae++){let Le=T(String(Ae),I[Ae],A,j,P);ye+=Le!==void 0?Le:"null",ye+=ke}let He=T(String(Ae),I[Ae],A,j,P);if(ye+=He!==void 0?He:"null",I.length-1>w){let Le=I.length-w-1;ye+=`${ke}"... ${as(Le)} not stringified"`}return ye+=`
31
+ ${F}`,A.pop(),`[${ye}]`}let q=Object.keys(I),W=q.length;if(W===0)return"{}";if(C<A.length+1)return'"[Object]"';P+=j;let ee=`,
32
+ ${P}`,te="",le="",he=Math.min(W,w);if(vg(I))te+=Q1(I,ee,w),q=q.slice(I.length),he-=I.length,le=ee;if(x)q=bg(q,z);A.push(I);for(let ye=0;ye<he;ye++){let ke=q[ye],me=T(ke,I[ke],A,j,P);if(me!==void 0)te+=`${le}${fi(ke)}: ${me}`,le=ee}if(W>w){let ye=W-w;te+=`${le}"...": "${as(ye)} not stringified"`,le=ee}if(le!=="")te=`
33
+ ${P}${te}
34
+ ${F}`;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 fi(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 j="",P=I.length!==void 0;if(P&&Array.isArray(I)){if(I.length===0)return"[]";if(C<A.length+1)return'"[Array]"';A.push(I);let te=Math.min(I.length,w),le=0;for(;le<te-1;le++){let ye=k(String(le),I[le],A);j+=ye!==void 0?ye:"null",j+=","}let he=k(String(le),I[le],A);if(j+=he!==void 0?he:"null",I.length-1>w){let ye=I.length-w-1;j+=`,"... ${as(ye)} not stringified"`}return A.pop(),`[${j}]`}let F=Object.keys(I),q=F.length;if(q===0)return"{}";if(C<A.length+1)return'"[Object]"';let W="",ee=Math.min(q,w);if(P&&vg(I))j+=Q1(I,",",w),F=F.slice(I.length),ee-=I.length,W=",";if(x)F=bg(F,z);A.push(I);for(let te=0;te<ee;te++){let le=F[te],he=k(le,I[le],A);if(he!==void 0)j+=`${W}${fi(le)}:${he}`,W=","}if(q>w){let te=q-w;j+=`${W}"...":"${as(te)} not stringified"`}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 O(R,I,A){if(arguments.length>1){let j="";if(typeof A==="number")j=" ".repeat(Math.min(A,10));else if(typeof A==="string")j=A.slice(0,10);if(I!=null){if(typeof I==="function")return S("",{"":R},[],I,j,"");if(Array.isArray(I))return E("",R,[],UV(I),j,"")}if(j.length!==0)return T("",R,[],j,"")}return k("",R,[])}return O}});var _g=i(function(TIe,rC){var GV=uo(),{MESSAGE:KV}=cr(),WV=ba();function JV(o,f){if(typeof f==="bigint")return f.toString();return f}rC.exports=GV((o,f)=>{let h=WV.configure(f);return o[KV]=h(o,f.replacer||JV,f.space),o})});var nC=i(function(kIe,oC){var ZV=uo();oC.exports=ZV((o,f)=>{if(f.message)return o.message=`[${f.label}] ${o.message}`,o;return o.label=f.label,o})});var sC=i(function(OIe,iC){var YV=uo(),{MESSAGE:XV}=cr(),QV=ba();iC.exports=YV((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[XV]=QV(f),o})});var cC=i(function(IIe,aC){var e9=uo();function t9(o,f,h){let y=f.reduce((z,C)=>(z[C]=o[C],delete o[C],z),{}),x=Object.keys(o).reduce((z,C)=>(z[C]=o[C],delete o[C],z),{});return Object.assign(o,y,{[h]:x}),o}function r9(o,f,h){return o[h]=f.reduce((y,x)=>(y[x]=o[x],delete o[x],y),{}),o}aC.exports=e9((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 t9(o,y,h);if(f.fillWith)return r9(o,f.fillWith,h);return o})});var uC=i(function(Kc,lC){var o9=uo(),n9=mm();lC.exports=o9((o)=>{let f=+new Date;return Kc.diff=f-(Kc.prevTime||f),Kc.prevTime=f,o.ms=`+${n9(Kc.diff)}`,o})});var fC=i(function(RIe,pC){var i9=c("util").inspect,s9=uo(),{LEVEL:a9,MESSAGE:dC,SPLAT:c9}=cr();pC.exports=s9((o,f={})=>{let h=Object.assign({},o);return delete h[a9],delete h[dC],delete h[c9],o[dC]=i9(h,!1,f.depth||null,f.colorize),o})});var hC=i(function(AIe,Ad){var{MESSAGE:l9}=cr();class zg{constructor(o){this.template=o}transform(o){return o[l9]=this.template(o),o}}Ad.exports=(o)=>new zg(o);Ad.exports.Printf=Ad.exports.Format=zg});var yC=i(function(PIe,gC){var u9=uo(),{MESSAGE:mC}=cr(),d9=ba();gC.exports=u9((o)=>{let f=d9(Object.assign({},o,{level:void 0,message:void 0,splat:void 0})),h=o.padding&&o.padding[o.level]||"";if(f!=="{}")o[mC]=`${o.level}:${h} ${o.message} ${f}`;else o[mC]=`${o.level}:${h} ${o.message}`;return o})});var _C=i(function(DIe,xC){var p9=c("util"),{SPLAT:bC}=cr(),f9=/%[scdjifoO%]/g,h9=/%%/g;class vC{constructor(o){this.options=o}_splat(o,f){let h=o.message,y=o[bC]||o.splat||[],x=h.match(h9),z=x&&x.length||0,w=f.length-z-y.length,S=w<0?y.splice(w,-1*w):[],E=S.length;if(E)for(let T=0;T<E;T++)Object.assign(o,S[T]);return o.message=p9.format(h,...y),o}transform(o){let f=o.message,h=o[bC]||o.splat;if(!h||!h.length)return o;let y=f&&f.match&&f.match(f9);if(!y&&(h||h.length)){let x=h.length>1?h.splice(0):h,z=x.length;if(z)for(let C=0;C<z;C++)Object.assign(o,x[C]);return o}if(y)return this._splat(o,y);return o}}xC.exports=(o)=>new vC(o)});var CC=i(function(Pd,zC){(function(o,f){typeof Pd==="object"&&typeof zC<"u"?f(Pd):typeof define==="function"&&define.amd?define(["exports"],f):f(o.fecha={})})(Pd,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}",z="\\d{4}",C="[^\\s]+",w=/\[([^]*?)\]/gm;function S(re,oe){var Ke=[];for(var Pt=0,Ce=re.length;Pt<Ce;Pt++)Ke.push(re[Pt].substr(0,oe));return Ke}var E=function(re){return function(oe,Ke){var Pt=Ke[re].map(function(De){return De.toLowerCase()}),Ce=Pt.indexOf(oe.toLowerCase());if(Ce>-1)return Ce;return null}};function T(re){var oe=[];for(var Ke=1;Ke<arguments.length;Ke++)oe[Ke-1]=arguments[Ke];for(var Pt=0,Ce=oe;Pt<Ce.length;Pt++){var De=Ce[Pt];for(var Ne in De)re[Ne]=De[Ne]}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=S(O,3),I=S(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]}},j=T({},A),P=function(re){return j=T(j,re)},F=function(re){return re.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},q=function(re,oe){if(oe===void 0)oe=2;re=String(re);while(re.length<oe)re="0"+re;return re},W={D:function(re){return String(re.getDate())},DD:function(re){return q(re.getDate())},Do:function(re,oe){return oe.DoFn(re.getDate())},d:function(re){return String(re.getDay())},dd:function(re){return q(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 q(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 q(String(re.getFullYear()),4).substr(2)},YYYY:function(re){return q(re.getFullYear(),4)},h:function(re){return String(re.getHours()%12||12)},hh:function(re){return q(re.getHours()%12||12)},H:function(re){return String(re.getHours())},HH:function(re){return q(re.getHours())},m:function(re){return String(re.getMinutes())},mm:function(re){return q(re.getMinutes())},s:function(re){return String(re.getSeconds())},ss:function(re){return q(re.getSeconds())},S:function(re){return String(Math.round(re.getMilliseconds()/100))},SS:function(re){return q(Math.round(re.getMilliseconds()/10),2)},SSS:function(re){return q(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?"-":"+")+q(Math.floor(Math.abs(oe)/60)*100+Math.abs(oe)%60,4)},Z:function(re){var oe=re.getTimezoneOffset();return(oe>0?"-":"+")+q(Math.floor(Math.abs(oe)/60),2)+":"+q(Math.abs(oe)%60,2)}},ee=function(re){return+re-1},te=[null,h],le=[null,C],he=["isPm",C,function(re,oe){var Ke=re.toLowerCase();if(Ke===oe.amPm[0])return 0;else if(Ke===oe.amPm[1])return 1;return null}],ye=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(re){var oe=(re+"").match(/([+-]|\d\d)/gi);if(oe){var Ke=+oe[1]*60+parseInt(oe[2],10);return oe[0]==="+"?Ke:-Ke}return 0}],ke={D:["day",h],DD:["day",y],Do:["day",h+C,function(re){return parseInt(re,10)}],M:["month",h,ee],MM:["month",y,ee],YY:["year",y,function(re){var oe=new Date,Ke=+(""+oe.getFullYear()).substr(0,2);return+(""+(+re>68?Ke-1:Ke)+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",z],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",C,E("monthNamesShort")],MMMM:["month",C,E("monthNames")],a:he,A:he,ZZ:ye,Z:ye},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 T(me,re)},He=function(re,oe,Ke){if(oe===void 0)oe=me.default;if(Ke===void 0)Ke={};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 Pt=[];oe=oe.replace(w,function(De,Ne){return Pt.push(Ne),"@@@"});var Ce=T(T({},j),Ke);return oe=oe.replace(f,function(De){return W[De](re,Ce)}),oe.replace(/@@@/g,function(){return Pt.shift()})};function Le(re,oe,Ke){if(Ke===void 0)Ke={};if(typeof oe!=="string")throw Error("Invalid format in fecha parse");if(oe=me[oe]||oe,re.length>1000)return null;var Pt=new Date,Ce={year:Pt.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},De=[],Ne=[],Ge=oe.replace(w,function(ao,rr){return Ne.push(F(rr)),"@@@"}),st={},St={};Ge=F(Ge).replace(f,function(ao){var rr=ke[ao],$e=rr[0],Kt=rr[1],ve=rr[3];if(st[$e])throw Error("Invalid format. "+$e+" specified twice in format");if(st[$e]=!0,ve)St[ve]=!0;return De.push(rr),"("+Kt+")"}),Object.keys(St).forEach(function(ao){if(!st[ao])throw Error("Invalid format. "+ao+" is required in specified format")}),Ge=Ge.replace(/@@@/g,function(){return Ne.shift()});var Et=re.match(new RegExp(Ge,"i"));if(!Et)return null;var je=T(T({},j),Ke);for(var Fe=1;Fe<Et.length;Fe++){var at=De[Fe-1],ut=at[0],Bt=at[2],ct=Bt?Bt(Et[Fe],je):+Et[Fe];if(ct==null)return null;Ce[ut]=ct}if(Ce.isPm===1&&Ce.hour!=null&&+Ce.hour!==12)Ce.hour=+Ce.hour+12;else if(Ce.isPm===0&&+Ce.hour===12)Ce.hour=0;var Ue;if(Ce.timezoneOffset==null){Ue=new Date(Ce.year,Ce.month,Ce.day,Ce.hour,Ce.minute,Ce.second,Ce.millisecond);var et=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]];for(var Fe=0,Rt=et.length;Fe<Rt;Fe++)if(st[et[Fe][0]]&&Ce[et[Fe][0]]!==Ue[et[Fe][1]]())return null}else if(Ue=new Date(Date.UTC(Ce.year,Ce.month,Ce.day,Ce.hour,Ce.minute-Ce.timezoneOffset,Ce.second,Ce.millisecond)),Ce.month>11||Ce.month<0||Ce.day>31||Ce.day<1||Ce.hour>23||Ce.hour<0||Ce.minute>59||Ce.minute<0||Ce.second>59||Ce.second<0)return null;return Ue}var Pe={format:He,parse:Le,defaultI18n:A,setGlobalDateI18n:P,setGlobalDateMasks:Ae};o.assign=T,o.default=Pe,o.format=He,o.parse=Le,o.defaultI18n=A,o.setGlobalDateI18n=P,o.setGlobalDateMasks=Ae,Object.defineProperty(o,"__esModule",{value:!0})})});var SC=i(function(BIe,wC){var m9=CC(),g9=uo();wC.exports=g9((o,f={})=>{if(f.format)o.timestamp=typeof f.format==="function"?f.format():m9.format(new Date,f.format);if(!o.timestamp)o.timestamp=new Date().toISOString();if(f.alias)o[f.alias]=o.timestamp;return o})});var TC=i(function(LIe,EC){var Cg=cg(),y9=uo(),{MESSAGE:wg}=cr();EC.exports=y9((o,f)=>{if(f.level!==!1)o.level=Cg.strip(o.level);if(f.message!==!1)o.message=Cg.strip(String(o.message));if(f.raw!==!1&&o[wg])o[wg]=Cg.strip(String(o[wg]));return o})});var Sg=i(function(v9){var b9=v9.format=uo();v9.levels=$1();function Rr(o,f){Object.defineProperty(b9,o,{get(){return f()},configurable:!0})}Rr("align",function(){return H1()});Rr("errors",function(){return W1()});Rr("cli",function(){return Z1()});Rr("combine",function(){return X1()});Rr("colorize",function(){return Id()});Rr("json",function(){return _g()});Rr("label",function(){return nC()});Rr("logstash",function(){return sC()});Rr("metadata",function(){return cC()});Rr("ms",function(){return uC()});Rr("padLevels",function(){return hg()});Rr("prettyPrint",function(){return fC()});Rr("printf",function(){return hC()});Rr("simple",function(){return yC()});Rr("splat",function(){return _C()});Rr("timestamp",function(){return SC()});Rr("uncolorize",function(){return TC()})});var Tg=i(function(_9){var{format:kC}=c("util");_9.warn={deprecated(o){return()=>{throw Error(kC("{ %s } was removed in winston@3.0.0.",o))}},useFormat(o){return()=>{throw Error([kC("{ %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]=_9.warn[f](y)})},forProperties(o,f,h){h.forEach((y)=>{let x=_9.warn[f](y);Object.defineProperty(o,y,{get:x,set:x})})}}});var OC=i(function(qIe,z9){z9.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 RC=i(function(FIe,IC){IC.exports=c("util").deprecate});var Og=i(function(UIe,PC){function C9(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(kg,this,o);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(kg,this,o)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(o||null,function(z){if(!f&&z)if(!h._writableState)process.nextTick(AC,h,z);else if(!h._writableState.errorEmitted)h._writableState.errorEmitted=!0,process.nextTick(AC,h,z);else process.nextTick(Dd,h);else if(f)process.nextTick(Dd,h),f(z);else process.nextTick(Dd,h)}),this}function AC(o,f){kg(o,f),Dd(o)}function Dd(o){if(o._writableState&&!o._writableState.emitClose)return;if(o._readableState&&!o._readableState.emitClose)return;o.emit("close")}function w9(){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 kg(o,f){o.emit("error",f)}function S9(o,f){var{_readableState:h,_writableState:y}=o;if(h&&h.autoDestroy||y&&y.autoDestroy)o.destroy(f);else o.emit("error",f)}PC.exports={destroy:C9,undestroy:w9,errorOrDestroy:S9}});var hi=i(function(O9,LC){var BC={};function Po(o,f,h){if(!h)h=Error;function y(z,C,w){if(typeof f==="string")return f;else return f(z,C,w)}class x extends h{constructor(z,C,w){super(y(z,C,w))}}x.prototype.name=h.name,x.prototype.code=o,BC[o]=x}function DC(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 E9(o,f,h){return o.substr(!h||h<0?0:+h,f.length)===f}function T9(o,f,h){if(h===void 0||h>o.length)h=o.length;return o.substring(h-f.length,h)===f}function k9(o,f,h){if(typeof h!=="number")h=0;if(h+f.length>o.length)return!1;else return o.indexOf(f,h)!==-1}Po("ERR_INVALID_OPT_VALUE",function(o,f){return'The value "'+f+'" is invalid for option "'+o+'"'},TypeError);Po("ERR_INVALID_ARG_TYPE",function(o,f,h){let y;if(typeof f==="string"&&E9(f,"not "))y="must not be",f=f.replace(/^not /,"");else y="must be";let x;if(T9(o," argument"))x=`The ${o} ${y} ${DC(f,"type")}`;else{let z=k9(o,".")?"property":"argument";x=`The "${o}" ${z} ${y} ${DC(f,"type")}`}return x+=`. Received type ${typeof h}`,x},TypeError);Po("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Po("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"});Po("ERR_STREAM_PREMATURE_CLOSE","Premature close");Po("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"});Po("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Po("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Po("ERR_STREAM_WRITE_AFTER_END","write after end");Po("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Po("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError);Po("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");O9.codes=BC});var Ig=i(function($Ie,NC){var R9=hi().codes.ERR_INVALID_OPT_VALUE;function A9(o,f,h){return o.highWaterMark!=null?o.highWaterMark:f?o[h]:null}function P9(o,f,h,y){var x=A9(f,y,h);if(x!=null){if(!(isFinite(x)&&Math.floor(x)===x)||x<0){var z=y?h:"highWaterMark";throw new R9(z,x)}return Math.floor(x)}return o.objectMode?16:16384}NC.exports={getHighWaterMark:P9}});var jC=i(function(VIe,Rg){if(typeof Object.create==="function")Rg.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 Rg.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(HIe,Ag){try{if(Bd=c("util"),typeof Bd.inherits!=="function")throw"";Ag.exports=Bd.inherits}catch(o){Ag.exports=jC()}var Bd});var VC=i(function(GIe,$C){function MC(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 qC(o){for(var f=1;f<arguments.length;f++){var h=arguments[f]!=null?arguments[f]:{};f%2?MC(Object(h),!0).forEach(function(y){D9(o,y,h[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(h)):MC(Object(h)).forEach(function(y){Object.defineProperty(o,y,Object.getOwnPropertyDescriptor(h,y))})}return o}function D9(o,f,h){if(f=UC(f),f in o)Object.defineProperty(o,f,{value:h,enumerable:!0,configurable:!0,writable:!0});else o[f]=h;return o}function B9(o,f){if(!(o instanceof f))throw TypeError("Cannot call a class as a function")}function FC(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,UC(y.key),y)}}function L9(o,f,h){if(f)FC(o.prototype,f);if(h)FC(o,h);return Object.defineProperty(o,"prototype",{writable:!1}),o}function UC(o){var f=N9(o,"string");return typeof f==="symbol"?f:String(f)}function N9(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 j9=c("buffer"),Ld=j9.Buffer,M9=c("util"),Pg=M9.inspect,q9=Pg&&Pg.custom||"inspect";function F9(o,f,h){Ld.prototype.copy.call(o,f,h)}$C.exports=function(){function o(){B9(this,o),this.head=null,this.tail=null,this.length=0}return L9(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 Ld.alloc(0);var y=Ld.allocUnsafe(h>>>0),x=this.head,z=0;while(x)F9(x.data,y,z),z+=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,z=y.data;h-=z.length;while(y=y.next){var C=y.data,w=h>C.length?C.length:h;if(w===C.length)z+=C;else z+=C.slice(0,h);if(h-=w,h===0){if(w===C.length)if(++x,y.next)this.head=y.next;else this.head=this.tail=null;else this.head=y,y.data=C.slice(w);break}++x}return this.length-=x,z}},{key:"_getBuffer",value:function(h){var y=Ld.allocUnsafe(h),x=this.head,z=1;x.data.copy(y),h-=x.data.length;while(x=x.next){var C=x.data,w=h>C.length?C.length:h;if(C.copy(y,y.length-h,0,w),h-=w,h===0){if(w===C.length)if(++z,x.next)this.head=x.next;else this.head=this.tail=null;else this.head=x,x.data=C.slice(w);break}++z}return this.length-=z,y}},{key:q9,value:function(h,y){return Pg(this,qC(qC({},y),{},{depth:0,customInspect:!1}))}}]),o}()});var Lg=i(function(tH){var Bg=yc().Buffer,HC=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 U9(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 $9(o){var f=U9(o);if(typeof f!=="string"&&(Bg.isEncoding===HC||!HC(o)))throw Error("Unknown encoding: "+o);return f||o}tH.StringDecoder=Wc;function Wc(o){this.encoding=$9(o);var f;switch(this.encoding){case"utf16le":this.text=J9,this.end=Z9,f=4;break;case"utf8":this.fillLast=G9,f=4;break;case"base64":this.text=Y9,this.end=X9,f=3;break;default:this.write=Q9,this.end=eH;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Bg.allocUnsafe(f)}Wc.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||""};Wc.prototype.end=W9;Wc.prototype.text=K9;Wc.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 Dg(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 V9(o,f,h){var y=f.length-1;if(y<h)return 0;var x=Dg(f[y]);if(x>=0){if(x>0)o.lastNeed=x-1;return x}if(--y<h||x===-2)return 0;if(x=Dg(f[y]),x>=0){if(x>0)o.lastNeed=x-2;return x}if(--y<h||x===-2)return 0;if(x=Dg(f[y]),x>=0){if(x>0)if(x===2)x=0;else o.lastNeed=x-3;return x}return 0}function H9(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 G9(o){var f=this.lastTotal-this.lastNeed,h=H9(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 K9(o,f){var h=V9(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 W9(o){var f=o&&o.length?this.write(o):"";if(this.lastNeed)return f+"�";return f}function J9(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 Z9(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 Y9(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 X9(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 Q9(o){return o.toString(this.encoding)}function eH(o){return o&&o.length?this.write(o):""}});var Nd=i(function(WIe,WC){var GC=hi().codes.ERR_STREAM_PREMATURE_CLOSE;function oH(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 nH(){}function iH(o){return o.setHeader&&typeof o.abort==="function"}function KC(o,f,h){if(typeof f==="function")return KC(o,null,f);if(!f)f={};h=oH(h||nH);var y=f.readable||f.readable!==!1&&o.readable,x=f.writable||f.writable!==!1&&o.writable,z=function(){if(!o.writable)w()},C=o._writableState&&o._writableState.finished,w=function(){if(x=!1,C=!0,!y)h.call(o)},S=o._readableState&&o._readableState.endEmitted,E=function(){if(y=!1,S=!0,!x)h.call(o)},T=function(I){h.call(o,I)},k=function(){var I;if(y&&!S){if(!o._readableState||!o._readableState.ended)I=new GC;return h.call(o,I)}if(x&&!C){if(!o._writableState||!o._writableState.ended)I=new GC;return h.call(o,I)}},O=function(){o.req.on("finish",w)};if(iH(o))if(o.on("complete",w),o.on("abort",k),o.req)O();else o.on("request",O);else if(x&&!o._writableState)o.on("end",z),o.on("close",z);if(o.on("end",E),o.on("finish",w),f.error!==!1)o.on("error",T);return o.on("close",k),function(){if(o.removeListener("complete",w),o.removeListener("abort",k),o.removeListener("request",O),o.req)o.req.removeListener("finish",w);o.removeListener("end",z),o.removeListener("close",z),o.removeListener("finish",w),o.removeListener("end",E),o.removeListener("error",T),o.removeListener("close",k)}}WC.exports=KC});var ZC=i(function(JIe,JC){var jd;function mi(o,f,h){if(f=sH(f),f in o)Object.defineProperty(o,f,{value:h,enumerable:!0,configurable:!0,writable:!0});else o[f]=h;return o}function sH(o){var f=aH(o,"string");return typeof f==="symbol"?f:String(f)}function aH(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 cH=Nd(),gi=Symbol("lastResolve"),ls=Symbol("lastReject"),Jc=Symbol("error"),Md=Symbol("ended"),us=Symbol("lastPromise"),Ng=Symbol("handlePromise"),ds=Symbol("stream");function yi(o,f){return{value:o,done:f}}function lH(o){var f=o[gi];if(f!==null){var h=o[ds].read();if(h!==null)o[us]=null,o[gi]=null,o[ls]=null,f(yi(h,!1))}}function uH(o){process.nextTick(lH,o)}function dH(o,f){return function(h,y){o.then(function(){if(f[Md]){h(yi(void 0,!0));return}f[Ng](h,y)},y)}}var pH=Object.getPrototypeOf(function(){}),fH=Object.setPrototypeOf((jd={get stream(){return this[ds]},next:function(){var f=this,h=this[Jc];if(h!==null)return Promise.reject(h);if(this[Md])return Promise.resolve(yi(void 0,!0));if(this[ds].destroyed)return new Promise(function(C,w){process.nextTick(function(){if(f[Jc])w(f[Jc]);else C(yi(void 0,!0))})});var y=this[us],x;if(y)x=new Promise(dH(y,this));else{var z=this[ds].read();if(z!==null)return Promise.resolve(yi(z,!1));x=new Promise(this[Ng])}return this[us]=x,x}},mi(jd,Symbol.asyncIterator,function(){return this}),mi(jd,"return",function(){var f=this;return new Promise(function(h,y){f[ds].destroy(null,function(x){if(x){y(x);return}h(yi(void 0,!0))})})}),jd),pH),hH=function(f){var h,y=Object.create(fH,(h={},mi(h,ds,{value:f,writable:!0}),mi(h,gi,{value:null,writable:!0}),mi(h,ls,{value:null,writable:!0}),mi(h,Jc,{value:null,writable:!0}),mi(h,Md,{value:f._readableState.endEmitted,writable:!0}),mi(h,Ng,{value:function(z,C){var w=y[ds].read();if(w)y[us]=null,y[gi]=null,y[ls]=null,z(yi(w,!1));else y[gi]=z,y[ls]=C},writable:!0}),h));return y[us]=null,cH(f,function(x){if(x&&x.code!=="ERR_STREAM_PREMATURE_CLOSE"){var z=y[ls];if(z!==null)y[us]=null,y[gi]=null,y[ls]=null,z(x);y[Jc]=x;return}var C=y[gi];if(C!==null)y[us]=null,y[gi]=null,y[ls]=null,C(yi(void 0,!0));y[Md]=!0}),f.on("readable",uH.bind(null,y)),y};JC.exports=hH});var ew=i(function(ZIe,QC){function YC(o,f,h,y,x,z,C){try{var w=o[z](C),S=w.value}catch(E){h(E);return}if(w.done)f(S);else Promise.resolve(S).then(y,x)}function mH(o){return function(){var f=this,h=arguments;return new Promise(function(y,x){var z=o.apply(f,h);function C(S){YC(z,y,x,C,w,"next",S)}function w(S){YC(z,y,x,C,w,"throw",S)}C(void 0)})}}function XC(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 gH(o){for(var f=1;f<arguments.length;f++){var h=arguments[f]!=null?arguments[f]:{};f%2?XC(Object(h),!0).forEach(function(y){yH(o,y,h[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(h)):XC(Object(h)).forEach(function(y){Object.defineProperty(o,y,Object.getOwnPropertyDescriptor(h,y))})}return o}function yH(o,f,h){if(f=bH(f),f in o)Object.defineProperty(o,f,{value:h,enumerable:!0,configurable:!0,writable:!0});else o[f]=h;return o}function bH(o){var f=vH(o,"string");return typeof f==="symbol"?f:String(f)}function vH(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 xH=hi().codes.ERR_INVALID_ARG_TYPE;function _H(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 xH("iterable",["Iterable"],f);var x=new o(gH({objectMode:!0},h)),z=!1;x._read=function(){if(!z)z=!0,C()};function C(){return w.apply(this,arguments)}function w(){return w=mH(function*(){try{var S=yield y.next(),{value:E,done:T}=S;if(T)x.push(null);else if(x.push(yield E))C();else z=!1}catch(k){x.destroy(k)}}),w.apply(this,arguments)}return x}QC.exports=_H});var Kg=i(function(XIe,uw){uw.exports=vt;var xa;vt.ReadableState=nw;var YIe=c("events").EventEmitter,ow=function(f,h){return f.listeners(h).length},Yc=c("stream"),qd=c("buffer").Buffer,zH=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function CH(o){return qd.from(o)}function wH(o){return qd.isBuffer(o)||o instanceof zH}var jg=c("util"),Qe;if(jg&&jg.debuglog)Qe=jg.debuglog("stream");else Qe=function(){};var SH=VC(),Hg=Og(),EH=Ig(),TH=EH.getHighWaterMark,Fd=hi().codes,{ERR_INVALID_ARG_TYPE:kH,ERR_STREAM_PUSH_AFTER_EOF:OH,ERR_METHOD_NOT_IMPLEMENTED:IH,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:RH}=Fd,_a,Mg,qg;va()(vt,Yc);var Zc=Hg.errorOrDestroy,Fg=["error","close","destroy","pause","resume"];function AH(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 nw(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=TH(this,o,"readableHighWaterMark",h),this.buffer=new SH,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=Lg().StringDecoder;this.decoder=new _a(o.encoding),this.encoding=o.encoding}}function vt(o){if(xa=xa||ps(),!(this instanceof vt))return new vt(o);var f=this instanceof xa;if(this._readableState=new nw(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}Yc.call(this)}Object.defineProperty(vt.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}});vt.prototype.destroy=Hg.destroy;vt.prototype._undestroy=Hg.undestroy;vt.prototype._destroy=function(o,f){f(o)};vt.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=qd.from(o,f),f="";y=!0}}else y=!0;return iw(this,o,f,!1,y)};vt.prototype.unshift=function(o){return iw(this,o,null,!0,!1)};function iw(o,f,h,y,x){Qe("readableAddChunk",f);var z=o._readableState;if(f===null)z.reading=!1,BH(o,z);else{var C;if(!x)C=PH(z,f);if(C)Zc(o,C);else if(z.objectMode||f&&f.length>0){if(typeof f!=="string"&&!z.objectMode&&Object.getPrototypeOf(f)!==qd.prototype)f=CH(f);if(y)if(z.endEmitted)Zc(o,new RH);else Ug(o,z,f,!0);else if(z.ended)Zc(o,new OH);else if(z.destroyed)return!1;else if(z.reading=!1,z.decoder&&!h)if(f=z.decoder.write(f),z.objectMode||f.length!==0)Ug(o,z,f,!1);else Vg(o,z);else Ug(o,z,f,!1)}else if(!y)z.reading=!1,Vg(o,z)}return!z.ended&&(z.length<z.highWaterMark||z.length===0)}function Ug(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)Ud(o)}Vg(o,f)}function PH(o,f){var h;if(!wH(f)&&typeof f!=="string"&&f!==void 0&&!o.objectMode)h=new kH("chunk",["string","Buffer","Uint8Array"],f);return h}vt.prototype.isPaused=function(){return this._readableState.flowing===!1};vt.prototype.setEncoding=function(o){if(!_a)_a=Lg().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 tw=1073741824;function DH(o){if(o>=tw)o=tw;else o--,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o++;return o}function rw(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=DH(o);if(o<=f.length)return o;if(!f.ended)return f.needReadable=!0,0;return f.length}vt.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)$g(this);else Ud(this);return null}if(o=rw(o,f),o===0&&f.ended){if(f.length===0)$g(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=rw(h,f)}var x;if(o>0)x=cw(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)$g(this)}if(x!==null)this.emit("data",x);return x};function BH(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)Ud(o);else if(f.needReadable=!1,!f.emittedReadable)f.emittedReadable=!0,sw(o)}function Ud(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(sw,o)}function sw(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,Gg(o)}function Vg(o,f){if(!f.readingMore)f.readingMore=!0,process.nextTick(LH,o,f)}function LH(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}vt.prototype._read=function(o){Zc(this,new IH("_read()"))};vt.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,z=x?w:A;if(y.endEmitted)process.nextTick(z);else h.once("end",z);o.on("unpipe",C);function C(j,P){if(Qe("onunpipe"),j===h){if(P&&P.hasUnpiped===!1)P.hasUnpiped=!0,T()}}function w(){Qe("onend"),o.end()}var S=NH(h);o.on("drain",S);var E=!1;function T(){if(Qe("cleanup"),o.removeListener("close",R),o.removeListener("finish",I),o.removeListener("drain",S),o.removeListener("error",O),o.removeListener("unpipe",C),h.removeListener("end",w),h.removeListener("end",A),h.removeListener("data",k),E=!0,y.awaitDrain&&(!o._writableState||o._writableState.needDrain))S()}h.on("data",k);function k(j){Qe("ondata");var P=o.write(j);if(Qe("dest.write",P),P===!1){if((y.pipesCount===1&&y.pipes===o||y.pipesCount>1&&lw(y.pipes,o)!==-1)&&!E)Qe("false write response, pause",y.awaitDrain),y.awaitDrain++;h.pause()}}function O(j){if(Qe("onerror",j),A(),o.removeListener("error",O),ow(o,"error")===0)Zc(o,j)}AH(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 NH(o){return function(){var h=o._readableState;if(Qe("pipeOnDrain",h.awaitDrain),h.awaitDrain)h.awaitDrain--;if(h.awaitDrain===0&&ow(o,"data"))h.flowing=!0,Gg(o)}}vt.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 z=0;z<x;z++)y[z].emit("unpipe",this,{hasUnpiped:!1});return this}var C=lw(f.pipes,o);if(C===-1)return this;if(f.pipes.splice(C,1),f.pipesCount-=1,f.pipesCount===1)f.pipes=f.pipes[0];return o.emit("unpipe",this,h),this};vt.prototype.on=function(o,f){var h=Yc.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)Ud(this);else if(!y.reading)process.nextTick(jH,this)}}return h};vt.prototype.addListener=vt.prototype.on;vt.prototype.removeListener=function(o,f){var h=Yc.prototype.removeListener.call(this,o,f);if(o==="readable")process.nextTick(aw,this);return h};vt.prototype.removeAllListeners=function(o){var f=Yc.prototype.removeAllListeners.apply(this,arguments);if(o==="readable"||o===void 0)process.nextTick(aw,this);return f};function aw(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 jH(o){Qe("readable nexttick read 0"),o.read(0)}vt.prototype.resume=function(){var o=this._readableState;if(!o.flowing)Qe("resume"),o.flowing=!o.readableListening,MH(this,o);return o.paused=!1,this};function MH(o,f){if(!f.resumeScheduled)f.resumeScheduled=!0,process.nextTick(qH,o,f)}function qH(o,f){if(Qe("resume",f.reading),!f.reading)o.read(0);if(f.resumeScheduled=!1,o.emit("resume"),Gg(o),f.flowing&&!f.reading)o.read(0)}vt.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 Gg(o){var f=o._readableState;Qe("flow",f.flowing);while(f.flowing&&o.read()!==null);}vt.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 C=h.decoder.end();if(C&&C.length)f.push(C)}f.push(null)}),o.on("data",function(C){if(Qe("wrapped data"),h.decoder)C=h.decoder.write(C);if(h.objectMode&&(C===null||C===void 0))return;else if(!h.objectMode&&(!C||!C.length))return;var w=f.push(C);if(!w)y=!0,o.pause()});for(var x in o)if(this[x]===void 0&&typeof o[x]==="function")this[x]=function(w){return function(){return o[w].apply(o,arguments)}}(x);for(var z=0;z<Fg.length;z++)o.on(Fg[z],this.emit.bind(this,Fg[z]));return this._read=function(C){if(Qe("wrapped _read",C),y)y=!1,o.resume()},this};if(typeof Symbol==="function")vt.prototype[Symbol.asyncIterator]=function(){if(Mg===void 0)Mg=ZC();return Mg(this)};Object.defineProperty(vt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(vt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(vt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(f){if(this._readableState)this._readableState.flowing=f}});vt._fromList=cw;Object.defineProperty(vt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function cw(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 $g(o){var f=o._readableState;if(Qe("endReadable",f.endEmitted),!f.endEmitted)f.ended=!0,process.nextTick(FH,f,o)}function FH(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")vt.from=function(o,f){if(qg===void 0)qg=ew();return qg(vt,o,f)};function lw(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,pw){var UH=Object.keys||function(o){var f=[];for(var h in o)f.push(h);return f};pw.exports=Cn;var dw=Kg(),Wg=Vd();va()(Cn,dw);{$d=UH(Wg.prototype);for(Xc=0;Xc<$d.length;Xc++)if(Qc=$d[Xc],!Cn.prototype[Qc])Cn.prototype[Qc]=Wg.prototype[Qc]}var $d,Qc,Xc;function Cn(o){if(!(this instanceof Cn))return new Cn(o);if(dw.call(this,o),Wg.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",$H)}}Object.defineProperty(Cn.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Cn.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Cn.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function $H(){if(this._writableState.ended)return;process.nextTick(VH,this)}function VH(o){o.end()}Object.defineProperty(Cn.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 Vd=i(function(eRe,bw){bw.exports=Xt;function hw(o){var f=this;this.next=null,this.entry=null,this.finish=function(){y7(f,o)}}var za;Xt.WritableState=tl;var HH={deprecate:RC()},mw=c("stream"),Gd=c("buffer").Buffer,GH=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function KH(o){return Gd.from(o)}function WH(o){return Gd.isBuffer(o)||o instanceof GH}var Zg=Og(),JH=Ig(),ZH=JH.getHighWaterMark,vi=hi().codes,{ERR_INVALID_ARG_TYPE:YH,ERR_METHOD_NOT_IMPLEMENTED:XH,ERR_MULTIPLE_CALLBACK:QH,ERR_STREAM_CANNOT_PIPE:e7,ERR_STREAM_DESTROYED:t7,ERR_STREAM_NULL_VALUES:r7,ERR_STREAM_WRITE_AFTER_END:o7,ERR_UNKNOWN_ENCODING:n7}=vi,Ca=Zg.errorOrDestroy;va()(Xt,mw);function i7(){}function tl(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=ZH(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){p7(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 hw(this)}tl.prototype.getBuffer=function(){var f=this.bufferedRequest,h=[];while(f)h.push(f),f=f.next;return h};(function(){try{Object.defineProperty(tl.prototype,"buffer",{get:HH.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(o){}})();var Hd;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")Hd=Function.prototype[Symbol.hasInstance],Object.defineProperty(Xt,Symbol.hasInstance,{value:function(f){if(Hd.call(this,f))return!0;if(this!==Xt)return!1;return f&&f._writableState instanceof tl}});else Hd=function(f){return f instanceof this};function Xt(o){za=za||ps();var f=this instanceof za;if(!f&&!Hd.call(Xt,this))return new Xt(o);if(this._writableState=new tl(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}mw.call(this)}Xt.prototype.pipe=function(){Ca(this,new e7)};function s7(o,f){var h=new o7;Ca(o,h),process.nextTick(f,h)}function a7(o,f,h,y){var x;if(h===null)x=new r7;else if(typeof h!=="string"&&!f.objectMode)x=new YH("chunk",["string","Buffer"],h);if(x)return Ca(o,x),process.nextTick(y,x),!1;return!0}Xt.prototype.write=function(o,f,h){var y=this._writableState,x=!1,z=!y.objectMode&&WH(o);if(z&&!Gd.isBuffer(o))o=KH(o);if(typeof f==="function")h=f,f=null;if(z)f="buffer";else if(!f)f=y.defaultEncoding;if(typeof h!=="function")h=i7;if(y.ending)s7(this,h);else if(z||a7(this,y,o,h))y.pendingcb++,x=l7(this,y,z,o,f,h);return x};Xt.prototype.cork=function(){this._writableState.corked++};Xt.prototype.uncork=function(){var o=this._writableState;if(o.corked){if(o.corked--,!o.writing&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest)gw(this,o)}};Xt.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 n7(f);return this._writableState.defaultEncoding=f,this};Object.defineProperty(Xt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function c7(o,f,h){if(!o.objectMode&&o.decodeStrings!==!1&&typeof f==="string")f=Gd.from(f,h);return f}Object.defineProperty(Xt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function l7(o,f,h,y,x,z){if(!h){var C=c7(f,y,x);if(y!==C)h=!0,x="buffer",y=C}var w=f.objectMode?1:y.length;f.length+=w;var S=f.length<f.highWaterMark;if(!S)f.needDrain=!0;if(f.writing||f.corked){var E=f.lastBufferedRequest;if(f.lastBufferedRequest={chunk:y,encoding:x,isBuf:h,callback:z,next:null},E)E.next=f.lastBufferedRequest;else f.bufferedRequest=f.lastBufferedRequest;f.bufferedRequestCount+=1}else Jg(o,f,!1,w,y,x,z);return S}function Jg(o,f,h,y,x,z,C){if(f.writelen=y,f.writecb=C,f.writing=!0,f.sync=!0,f.destroyed)f.onwrite(new t7("write"));else if(h)o._writev(x,f.onwrite);else o._write(x,z,f.onwrite);f.sync=!1}function u7(o,f,h,y,x){if(--f.pendingcb,h)process.nextTick(x,y),process.nextTick(el,o,f),o._writableState.errorEmitted=!0,Ca(o,y);else x(y),o._writableState.errorEmitted=!0,Ca(o,y),el(o,f)}function d7(o){o.writing=!1,o.writecb=null,o.length-=o.writelen,o.writelen=0}function p7(o,f){var h=o._writableState,{sync:y,writecb:x}=h;if(typeof x!=="function")throw new QH;if(d7(h),f)u7(o,h,y,f,x);else{var z=yw(h)||o.destroyed;if(!z&&!h.corked&&!h.bufferProcessing&&h.bufferedRequest)gw(o,h);if(y)process.nextTick(fw,o,h,z,x);else fw(o,h,z,x)}}function fw(o,f,h,y){if(!h)f7(o,f);f.pendingcb--,y(),el(o,f)}function f7(o,f){if(f.length===0&&f.needDrain)f.needDrain=!1,o.emit("drain")}function gw(o,f){f.bufferProcessing=!0;var h=f.bufferedRequest;if(o._writev&&h&&h.next){var y=f.bufferedRequestCount,x=Array(y),z=f.corkedRequestsFree;z.entry=h;var C=0,w=!0;while(h){if(x[C]=h,!h.isBuf)w=!1;h=h.next,C+=1}if(x.allBuffers=w,Jg(o,f,!0,f.length,x,"",z.finish),f.pendingcb++,f.lastBufferedRequest=null,z.next)f.corkedRequestsFree=z.next,z.next=null;else f.corkedRequestsFree=new hw(f);f.bufferedRequestCount=0}else{while(h){var S=h.chunk,E=h.encoding,T=h.callback,k=f.objectMode?1:S.length;if(Jg(o,f,!1,k,S,E,T),h=h.next,f.bufferedRequestCount--,f.writing)break}if(h===null)f.lastBufferedRequest=null}f.bufferedRequest=h,f.bufferProcessing=!1}Xt.prototype._write=function(o,f,h){h(new XH("_write()"))};Xt.prototype._writev=null;Xt.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)g7(this,y,h);return this};Object.defineProperty(Xt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function yw(o){return o.ending&&o.length===0&&o.bufferedRequest===null&&!o.finished&&!o.writing}function h7(o,f){o._final(function(h){if(f.pendingcb--,h)Ca(o,h);f.prefinished=!0,o.emit("prefinish"),el(o,f)})}function m7(o,f){if(!f.prefinished&&!f.finalCalled)if(typeof o._final==="function"&&!f.destroyed)f.pendingcb++,f.finalCalled=!0,process.nextTick(h7,o,f);else f.prefinished=!0,o.emit("prefinish")}function el(o,f){var h=yw(f);if(h){if(m7(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 g7(o,f,h){if(f.ending=!0,el(o,f),h)if(f.finished)process.nextTick(h);else o.once("finish",h);f.ended=!0,o.writable=!1}function y7(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(Xt.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}});Xt.prototype.destroy=Zg.destroy;Xt.prototype._undestroy=Zg.undestroy;Xt.prototype._destroy=function(o,f){f(o)}});var Yg=i(function(tRe,_w){var b7=c("util"),vw=Vd(),{LEVEL:xw}=cr(),rl=_w.exports=function(f={}){if(vw.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()}})};b7.inherits(rl,vw);rl.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[xw]]){if(f&&!this.format)return this.log(f,y);let z,C;try{C=this.format.transform(Object.assign({},f),this.format.options)}catch(w){z=w}if(z||!C){if(y(),z)throw z;return}return this.log(C,y)}return this._writableState.sync=!1,y(null)};rl.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,z;try{z=this.format.transform(Object.assign({},f[y].chunk),this.format.options)}catch(C){x=C}if(x||!z){if(f[y].callback(),x)throw h(null),x}else this.log(z,f[y].callback)}return h(null)};rl.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[xw]]){if(this.handleExceptions||h.exception!==!0)return!0}return!1};rl.prototype._nop=function(){return}});var Qg=i(function(rRe,Cw){var v7=c("util"),{LEVEL:Xg}=cr(),zw=Yg(),ol=Cw.exports=function(f={}){if(zw.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)};v7.inherits(ol,zw);ol.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[Xg]])this.transport.log(f[Xg],f.message,f,this._nop);y(null)};ol.prototype._writev=function(f,h){for(let y=0;y<f.length;y++)if(this._accept(f[y]))this.transport.log(f[y].chunk[Xg],f[y].chunk.message,f[y].chunk,this._nop),f[y].callback();return h(null)};ol.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
+ `))};ol.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(oRe,e0){e0.exports=Yg();e0.exports.LegacyTransportStream=Qg()});var Ew=i(function(nRe,Sw){var x7=c("os"),{LEVEL:ww,MESSAGE:Sa}=cr(),_7=wa();Sw.exports=class extends _7{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:x7.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[ww]]){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[ww]]){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 Kd=i(function(t0,Tw){Object.defineProperty(t0,"__esModule",{value:!0});t0.default=z7;function z7(o){return o&&typeof o.length==="number"&&o.length>=0&&o.length%1===0}Tw.exports=t0.default});var Ow=i(function(r0,kw){Object.defineProperty(r0,"__esModule",{value:!0});r0.default=function(o){return function(...f){var h=f.pop();return o.call(this,f,h)}};kw.exports=r0.default});var Pw=i(function(Aw){Object.defineProperty(Aw,"__esModule",{value:!0});Aw.fallback=Iw;Aw.wrap=Rw;var S7=Aw.hasQueueMicrotask=typeof queueMicrotask==="function"&&queueMicrotask,E7=Aw.hasSetImmediate=typeof setImmediate==="function"&&setImmediate,T7=Aw.hasNextTick=typeof process==="object"&&typeof process.nextTick==="function";function Iw(o){setTimeout(o,0)}function Rw(o){return(f,...h)=>o(()=>f(...h))}var nl;if(S7)nl=queueMicrotask;else if(E7)nl=setImmediate;else if(T7)nl=process.nextTick;else nl=Iw;Aw.default=Rw(nl)});var jw=i(function(o0,Nw){Object.defineProperty(o0,"__esModule",{value:!0});o0.default=L7;var R7=Ow(),A7=Lw(R7),P7=Pw(),D7=Lw(P7),B7=fs();function Lw(o){return o&&o.__esModule?o:{default:o}}function L7(o){if((0,B7.isAsync)(o))return function(...f){let h=f.pop(),y=o.apply(this,f);return Dw(y,h)};return(0,A7.default)(function(f,h){var y;try{y=o.apply(this,f)}catch(x){return h(x)}if(y&&typeof y.then==="function")return Dw(y,h);else h(null,y)})}function Dw(o,f){return o.then((h)=>{Bw(f,null,h)},(h)=>{Bw(f,h&&(h instanceof Error||h.message)?h:Error(h))})}function Bw(o,f,h){try{o(f,h)}catch(y){(0,D7.default)((x)=>{throw x},y)}}Nw.exports=o0.default});var fs=i(function(qw){Object.defineProperty(qw,"__esModule",{value:!0});qw.isAsyncIterable=qw.isAsyncGenerator=qw.isAsync=void 0;var j7=jw(),M7=q7(j7);function q7(o){return o&&o.__esModule?o:{default:o}}function Mw(o){return o[Symbol.toStringTag]==="AsyncFunction"}function F7(o){return o[Symbol.toStringTag]==="AsyncGenerator"}function U7(o){return typeof o[Symbol.asyncIterator]==="function"}function $7(o){if(typeof o!=="function")throw Error("expected a function");return Mw(o)?(0,M7.default)(o):o}qw.default=$7;qw.isAsync=Mw;qw.isAsyncGenerator=F7;qw.isAsyncIterable=U7});var Ea=i(function(n0,Uw){Object.defineProperty(n0,"__esModule",{value:!0});n0.default=K7;function K7(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,z)=>{y[f-1]=(C,...w)=>{if(C)return z(C);x(w.length>1?w:w[0])},o.apply(this,y)})}return h}Uw.exports=n0.default});var Vw=i(function(s0,$w){Object.defineProperty(s0,"__esModule",{value:!0});var J7=Kd(),Z7=i0(J7),Y7=fs(),X7=i0(Y7),Q7=Ea(),eG=i0(Q7);function i0(o){return o&&o.__esModule?o:{default:o}}s0.default=(0,eG.default)((o,f,h)=>{var y=(0,Z7.default)(f)?[]:{};o(f,(x,z,C)=>{(0,X7.default)(x)((w,...S)=>{if(S.length<2)[S]=S;y[z]=S,C(w)})},(x)=>h(x,y))},3);$w.exports=s0.default});var c0=i(function(a0,Hw){Object.defineProperty(a0,"__esModule",{value:!0});a0.default=rG;function rG(o){function f(...h){if(o===null)return;var y=o;o=null,y.apply(this,h)}return Object.assign(f,o),f}Hw.exports=a0.default});var Kw=i(function(l0,Gw){Object.defineProperty(l0,"__esModule",{value:!0});l0.default=function(o){return o[Symbol.iterator]&&o[Symbol.iterator]()};Gw.exports=l0.default});var Zw=i(function(u0,Jw){Object.defineProperty(u0,"__esModule",{value:!0});u0.default=pG;var iG=Kd(),sG=Ww(iG),aG=Kw(),cG=Ww(aG);function Ww(o){return o&&o.__esModule?o:{default:o}}function lG(o){var f=-1,h=o.length;return function(){return++f<h?{value:o[f],key:f}:null}}function uG(o){var f=-1;return function(){var y=o.next();if(y.done)return null;return f++,{value:y.value,key:f}}}function dG(o){var f=o?Object.keys(o):[],h=-1,y=f.length;return function x(){var z=f[++h];if(z==="__proto__")return x();return h<y?{value:o[z],key:z}:null}}function pG(o){if((0,sG.default)(o))return lG(o);var f=(0,cG.default)(o);return f?uG(f):dG(o)}Jw.exports=u0.default});var p0=i(function(d0,Yw){Object.defineProperty(d0,"__esModule",{value:!0});d0.default=hG;function hG(o){return function(...f){if(o===null)throw Error("Callback was already called.");var h=o;o=null,h.apply(this,f)}}Yw.exports=d0.default});var Wd=i(function(f0,Xw){Object.defineProperty(f0,"__esModule",{value:!0});var gG={};f0.default=gG;Xw.exports=f0.default});var eS=i(function(h0,Qw){Object.defineProperty(h0,"__esModule",{value:!0});h0.default=_G;var bG=Wd(),vG=xG(bG);function xG(o){return o&&o.__esModule?o:{default:o}}function _G(o,f,h,y){let x=!1,z=!1,C=!1,w=0,S=0;function E(){if(w>=f||C||x)return;C=!0,o.next().then(({value:O,done:R})=>{if(z||x)return;if(C=!1,R){if(x=!0,w<=0)y(null);return}w++,h(O,S,T),S++,E()}).catch(k)}function T(O,R){if(w-=1,z)return;if(O)return k(O);if(O===!1){x=!0,z=!0;return}if(R===vG.default||x&&w<=0)return x=!0,y(null);E()}function k(O){if(z)return;C=!1,x=!0,y(O)}E()}Qw.exports=h0.default});var nS=i(function(m0,oS){Object.defineProperty(m0,"__esModule",{value:!0});var CG=c0(),wG=il(CG),SG=Zw(),EG=il(SG),TG=p0(),kG=il(TG),tS=fs(),OG=eS(),rS=il(OG),IG=Wd(),RG=il(IG);function il(o){return o&&o.__esModule?o:{default:o}}m0.default=(o)=>(f,h,y)=>{if(y=(0,wG.default)(y),o<=0)throw RangeError("concurrency limit cannot be less than 1");if(!f)return y(null);if((0,tS.isAsyncGenerator)(f))return(0,rS.default)(f,o,h,y);if((0,tS.isAsyncIterable)(f))return(0,rS.default)(f[Symbol.asyncIterator](),o,h,y);var x=(0,EG.default)(f),z=!1,C=!1,w=0,S=!1;function E(k,O){if(C)return;if(w-=1,k)z=!0,y(k);else if(k===!1)z=!0,C=!0;else if(O===RG.default||z&&w<=0)return z=!0,y(null);else if(!S)T()}function T(){S=!0;while(w<o&&!z){var k=x();if(k===null){if(z=!0,w<=0)y(null);return}w+=1,h(k.value,k.key,(0,kG.default)(E))}S=!1}T()};oS.exports=m0.default});var b0=i(function(y0,iS){Object.defineProperty(y0,"__esModule",{value:!0});var PG=nS(),DG=g0(PG),BG=fs(),LG=g0(BG),NG=Ea(),jG=g0(NG);function g0(o){return o&&o.__esModule?o:{default:o}}function MG(o,f,h,y){return(0,DG.default)(f)(o,(0,LG.default)(h),y)}y0.default=(0,jG.default)(MG,4);iS.exports=y0.default});var cS=i(function(v0,aS){Object.defineProperty(v0,"__esModule",{value:!0});var FG=b0(),UG=sS(FG),$G=Ea(),VG=sS($G);function sS(o){return o&&o.__esModule?o:{default:o}}function HG(o,f,h){return(0,UG.default)(o,1,f,h)}v0.default=(0,VG.default)(HG,3);aS.exports=v0.default});var dS=i(function(x0,uS){Object.defineProperty(x0,"__esModule",{value:!0});x0.default=YG;var KG=Vw(),WG=lS(KG),JG=cS(),ZG=lS(JG);function lS(o){return o&&o.__esModule?o:{default:o}}function YG(o,f){return(0,WG.default)(ZG.default,o,f)}uS.exports=x0.default});var _0=i(function(uRe,fS){fS.exports=Jn;var Jd=hi().codes,{ERR_METHOD_NOT_IMPLEMENTED:QG,ERR_MULTIPLE_CALLBACK:eK,ERR_TRANSFORM_ALREADY_TRANSFORMING:tK,ERR_TRANSFORM_WITH_LENGTH_0:rK}=Jd,Zd=ps();va()(Jn,Zd);function oK(o,f){var h=this._transformState;h.transforming=!1;var y=h.writecb;if(y===null)return this.emit("error",new eK);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 Jn(o){if(!(this instanceof Jn))return new Jn(o);if(Zd.call(this,o),this._transformState={afterTransform:oK.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",nK)}function nK(){var o=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(f,h){pS(o,f,h)});else pS(this,null,null)}Jn.prototype.push=function(o,f){return this._transformState.needTransform=!1,Zd.prototype.push.call(this,o,f)};Jn.prototype._transform=function(o,f,h){h(new QG("_transform()"))};Jn.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)}};Jn.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};Jn.prototype._destroy=function(o,f){Zd.prototype._destroy.call(this,o,function(h){f(h)})};function pS(o,f,h){if(f)return o.emit("error",f);if(h!=null)o.push(h);if(o._writableState.length)throw new rK;if(o._transformState.transforming)throw new tK;return o.push(null)}});var gS=i(function(dRe,mS){mS.exports=sl;var hS=_0();va()(sl,hS);function sl(o){if(!(this instanceof sl))return new sl(o);hS.call(this,o)}sl.prototype._transform=function(o,f,h){h(null,o)}});var _S=i(function(pRe,xS){var z0;function iK(o){var f=!1;return function(){if(f)return;f=!0,o.apply(void 0,arguments)}}var vS=hi().codes,{ERR_MISSING_ARGS:sK,ERR_STREAM_DESTROYED:aK}=vS;function yS(o){if(o)throw o}function cK(o){return o.setHeader&&typeof o.abort==="function"}function lK(o,f,h,y){y=iK(y);var x=!1;if(o.on("close",function(){x=!0}),z0===void 0)z0=Nd();z0(o,{readable:f,writable:h},function(C){if(C)return y(C);x=!0,y()});var z=!1;return function(C){if(x)return;if(z)return;if(z=!0,cK(o))return o.abort();if(typeof o.destroy==="function")return o.destroy();y(C||new aK("pipe"))}}function bS(o){o()}function uK(o,f){return o.pipe(f)}function dK(o){if(!o.length)return yS;if(typeof o[o.length-1]!=="function")return yS;return o.pop()}function pK(){for(var o=arguments.length,f=Array(o),h=0;h<o;h++)f[h]=arguments[h];var y=dK(f);if(Array.isArray(f[0]))f=f[0];if(f.length<2)throw new sK("streams");var x,z=f.map(function(C,w){var S=w<f.length-1,E=w>0;return lK(C,S,E,function(T){if(!x)x=T;if(T)z.forEach(bS);if(S)return;z.forEach(bS),y(x)})});return f.reduce(uK)}xS.exports=pK});var hs=i(function(Do,cl){var al=c("stream");if(process.env.READABLE_STREAM==="disable"&&al)cl.exports=al.Readable,Object.assign(cl.exports,al),cl.exports.Stream=al;else Do=cl.exports=Kg(),Do.Stream=al||Do,Do.Readable=Do,Do.Writable=Vd(),Do.Duplex=ps(),Do.Transform=_0(),Do.PassThrough=gS(),Do.finished=Nd(),Do.pipeline=_S()});var wS=i(function(fRe,CS){var Ta=[],ll=[],C0=function(){};function S0(o){if(~Ta.indexOf(o))return!1;return Ta.push(o),!0}function E0(o){C0=o}function fK(o){var f=[];for(var h=0;h<Ta.length;h++){if(Ta[h].async){f.push(Ta[h]);continue}if(Ta[h](o))return!0}if(!f.length)return!1;return new Promise(function(x){Promise.all(f.map(function(C){return C(o)})).then(function(C){x(C.some(Boolean))})})}function T0(o){if(~ll.indexOf(o))return!1;return ll.push(o),!0}function w0(){C0.apply(C0,arguments)}function zS(o){for(var f=0;f<ll.length;f++)o=ll[f].apply(ll[f],arguments);return o}function k0(o,f){var h=Object.prototype.hasOwnProperty;for(var y in f)if(h.call(f,y))o[y]=f[y];return o}function hK(o){return o.enabled=!1,o.modify=T0,o.set=E0,o.use=S0,k0(function(){return!1},o)}function mK(o){function f(){var h=Array.prototype.slice.call(arguments,0);return w0.call(w0,o,zS(h,o)),!0}return o.enabled=!0,o.modify=T0,o.set=E0,o.use=S0,k0(f,o)}CS.exports=function(f){return f.introduce=k0,f.enabled=fK,f.process=zS,f.modify=T0,f.write=w0,f.nope=hK,f.yep=mK,f.set=E0,f.use=S0,f}});var IS=i(function(hRe,OS){var wn={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]},ES=Object.create(null);for(let o in wn)if(Object.hasOwn(wn,o))ES[wn[o]]=o;var gr={to:{},get:{}};gr.get=function(o){let f=o.slice(0,3).toLowerCase(),h,y;switch(f){case"hsl":{h=gr.get.hsl(o),y="hsl";break}case"hwb":{h=gr.get.hwb(o),y="hwb";break}default:{h=gr.get.rgb(o),y="rgb";break}}if(!h)return null;return{model:y,value:h}};gr.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*)?\)$/,z=/^(\w+)$/,C=[0,0,0,1],w,S,E;if(w=o.match(h)){E=w[2],w=w[1];for(S=0;S<3;S++){let T=S*2;C[S]=Number.parseInt(w.slice(T,T+2),16)}if(E)C[3]=Number.parseInt(E,16)/255}else if(w=o.match(f)){w=w[1],E=w[3];for(S=0;S<3;S++)C[S]=Number.parseInt(w[S]+w[S],16);if(E)C[3]=Number.parseInt(E+E,16)/255}else if(w=o.match(y)){for(S=0;S<3;S++)C[S]=Number.parseInt(w[S+1],10);if(w[4])C[3]=w[5]?Number.parseFloat(w[4])*0.01:Number.parseFloat(w[4])}else if(w=o.match(x)){for(S=0;S<3;S++)C[S]=Math.round(Number.parseFloat(w[S+1])*2.55);if(w[4])C[3]=w[5]?Number.parseFloat(w[4])*0.01:Number.parseFloat(w[4])}else if(w=o.match(z)){if(w[1]==="transparent")return[0,0,0,0];if(!Object.hasOwn(wn,w[1]))return null;return C=wn[w[1]],C[3]=1,C}else return null;for(S=0;S<3;S++)C[S]=xi(C[S],0,255);return C[3]=xi(C[3],0,1),C};gr.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,z=xi(Number.parseFloat(h[2]),0,100),C=xi(Number.parseFloat(h[3]),0,100),w=xi(Number.isNaN(y)?1:y,0,1);return[x,z,C,w]}return null};gr.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,z=xi(Number.parseFloat(h[2]),0,100),C=xi(Number.parseFloat(h[3]),0,100),w=xi(Number.isNaN(y)?1:y,0,1);return[x,z,C,w]}return null};gr.to.hex=function(...o){return"#"+Yd(o[0])+Yd(o[1])+Yd(o[2])+(o[3]<1?Yd(Math.round(o[3]*255)):"")};gr.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]+")"};gr.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]+")"};gr.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]+")"};gr.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+")"};gr.to.keyword=function(...o){return ES[o.slice(0,3)]};function xi(o,f,h){return Math.min(Math.max(f,o),h)}function Yd(o){let f=Math.round(o).toString(16).toUpperCase();return f.length<2?"0"+f:f}var TS={};for(let o of Object.keys(wn))TS[wn[o]]=o;var ze={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"]}},Zn=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(ze)){if(!("channels"in ze[o]))throw Error("missing channels property: "+o);if(!("labels"in ze[o]))throw Error("missing channel labels property: "+o);if(ze[o].labels.length!==ze[o].channels)throw Error("channel and label counts mismatch: "+o);let{channels:f,labels:h}=ze[o];delete ze[o].channels,delete ze[o].labels,Object.defineProperty(ze[o],"channels",{value:f}),Object.defineProperty(ze[o],"labels",{value:h})}ze.rgb.hsl=function(o){let f=o[0]/255,h=o[1]/255,y=o[2]/255,x=Math.min(f,h,y),z=Math.max(f,h,y),C=z-x,w,S;switch(z){case x:{w=0;break}case f:{w=(h-y)/C;break}case h:{w=2+(y-f)/C;break}case y:{w=4+(f-h)/C;break}}if(w=Math.min(w*60,360),w<0)w+=360;let E=(x+z)/2;if(z===x)S=0;else if(E<=0.5)S=C/(z+x);else S=C/(2-z-x);return[w,S*100,E*100]};ze.rgb.hsv=function(o){let f,h,y,x,z,C=o[0]/255,w=o[1]/255,S=o[2]/255,E=Math.max(C,w,S),T=E-Math.min(C,w,S),k=function(O){return(E-O)/6/T+0.5};if(T===0)x=0,z=0;else{switch(z=T/E,f=k(C),h=k(w),y=k(S),E){case C:{x=y-h;break}case w:{x=0.3333333333333333+f-y;break}case S:{x=0.6666666666666666+h-f;break}}if(x<0)x+=1;else if(x>1)x-=1}return[x*360,z*100,E*100]};ze.rgb.hwb=function(o){let f=o[0],h=o[1],y=o[2],x=ze.rgb.hsl(o)[0],z=0.00392156862745098*Math.min(f,Math.min(h,y));return y=1-0.00392156862745098*Math.max(f,Math.max(h,y)),[x,z*100,y*100]};ze.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),z=Math.cbrt(0.2119034982*f+0.6806995451*h+0.1073969566*y),C=Math.cbrt(0.0883024619*f+0.2817188376*h+0.6299787005*y),w=0.2104542553*x+0.793617785*z-0.0040720468*C,S=1.9779984951*x-2.428592205*z+0.4505937099*C,E=0.0259040371*x+0.7827717662*z-0.808675766*C;return[w*100,S*100,E*100]};ze.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),z=(1-f-x)/(1-x)||0,C=(1-h-x)/(1-x)||0,w=(1-y-x)/(1-x)||0;return[z*100,C*100,w*100,x*100]};function gK(o,f){return(o[0]-f[0])**2+(o[1]-f[1])**2+(o[2]-f[2])**2}ze.rgb.keyword=function(o){let f=TS[o];if(f)return f;let h=Number.POSITIVE_INFINITY,y;for(let x of Object.keys(wn)){let z=wn[x],C=gK(o,z);if(C<h)h=C,y=x}return y};ze.keyword.rgb=function(o){return wn[o]};ze.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,z=f*0.2126729+h*0.7151522+y*0.072175,C=f*0.0193339+h*0.119192+y*0.9503041;return[x*100,z*100,C*100]};ze.rgb.lab=function(o){let f=ze.rgb.xyz(o),h=f[0],y=f[1],x=f[2];h/=95.047,y/=100,x/=108.883,h=h>Zn?h**0.3333333333333333:7.787*h+0.13793103448275862,y=y>Zn?y**0.3333333333333333:7.787*y+0.13793103448275862,x=x>Zn?x**0.3333333333333333:7.787*x+0.13793103448275862;let z=116*y-16,C=500*(h-y),w=200*(y-x);return[z,C,w]};ze.hsl.rgb=function(o){let f=o[0]/360,h=o[1]/100,y=o[2]/100,x,z;if(h===0)return z=y*255,[z,z,z];let C=y<0.5?y*(1+h):y+h-y*h,w=2*y-C,S=[0,0,0];for(let E=0;E<3;E++){if(x=f+0.3333333333333333*-(E-1),x<0)x++;if(x>1)x--;if(6*x<1)z=w+(C-w)*6*x;else if(2*x<1)z=C;else if(3*x<2)z=w+(C-w)*(0.6666666666666666-x)*6;else z=w;S[E]=z*255}return S};ze.hsl.hsv=function(o){let f=o[0],h=o[1]/100,y=o[2]/100,x=h,z=Math.max(y,0.01);y*=2,h*=y<=1?y:2-y,x*=z<=1?z:2-z;let C=(y+h)/2,w=y===0?2*x/(z+x):2*h/(y+h);return[f,w*100,C*100]};ze.hsv.rgb=function(o){let f=o[0]/60,h=o[1]/100,y=o[2]/100,x=Math.floor(f)%6,z=f-Math.floor(f),C=255*y*(1-h),w=255*y*(1-h*z),S=255*y*(1-h*(1-z));switch(y*=255,x){case 0:return[y,S,C];case 1:return[w,y,C];case 2:return[C,y,S];case 3:return[C,w,y];case 4:return[S,C,y];case 5:return[y,C,w]}};ze.hsv.hsl=function(o){let f=o[0],h=o[1]/100,y=o[2]/100,x=Math.max(y,0.01),z,C;C=(2-h)*y;let w=(2-h)*x;return z=h*x,z/=w<=1?w:2-w,z=z||0,C/=2,[f,z*100,C*100]};ze.hwb.rgb=function(o){let f=o[0]/360,h=o[1]/100,y=o[2]/100,x=h+y,z;if(x>1)h/=x,y/=x;let C=Math.floor(6*f),w=1-y;if(z=6*f-C,(C&1)!==0)z=1-z;let S=h+z*(w-h),E,T,k;switch(C){default:case 6:case 0:{E=w,T=S,k=h;break}case 1:{E=S,T=w,k=h;break}case 2:{E=h,T=w,k=S;break}case 3:{E=h,T=S,k=w;break}case 4:{E=S,T=h,k=w;break}case 5:{E=w,T=h,k=S;break}}return[E*255,T*255,k*255]};ze.cmyk.rgb=function(o){let f=o[0]/100,h=o[1]/100,y=o[2]/100,x=o[3]/100,z=1-Math.min(1,f*(1-x)+x),C=1-Math.min(1,h*(1-x)+x),w=1-Math.min(1,y*(1-x)+x);return[z*255,C*255,w*255]};ze.xyz.rgb=function(o){let f=o[0]/100,h=o[1]/100,y=o[2]/100,x,z,C;return x=f*3.2404542+h*-1.5371385+y*-0.4985314,z=f*-0.969266+h*1.8760108+y*0.041556,C=f*0.0556434+h*-0.2040259+y*1.0572252,x=ka(x),z=ka(z),C=ka(C),[x*255,z*255,C*255]};ze.xyz.lab=function(o){let f=o[0],h=o[1],y=o[2];f/=95.047,h/=100,y/=108.883,f=f>Zn?f**0.3333333333333333:7.787*f+0.13793103448275862,h=h>Zn?h**0.3333333333333333:7.787*h+0.13793103448275862,y=y>Zn?y**0.3333333333333333:7.787*y+0.13793103448275862;let x=116*h-16,z=500*(f-h),C=200*(h-y);return[x,z,C]};ze.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),z=Math.cbrt(0.0329845436*f+0.9293118715*h+0.0361456387*y),C=Math.cbrt(0.0482003018*f+0.2643662691*h+0.633851707*y),w=0.2104542553*x+0.793617785*z-0.0040720468*C,S=1.9779984951*x-2.428592205*z+0.4505937099*C,E=0.0259040371*x+0.7827717662*z-0.808675766*C;return[w*100,S*100,E*100]};ze.oklab.oklch=function(o){return ze.lab.lch(o)};ze.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,z=(1.000000008*f-0.105561342*h-0.063854175*y)**3,C=(1.000000055*f-0.089484182*h-1.291485538*y)**3,w=1.227013851*x-0.55779998*z+0.281256149*C,S=-0.040580178*x+1.11225687*z-0.071676679*C,E=-0.076381285*x-0.421481978*z+1.58616322*C;return[w*100,S*100,E*100]};ze.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,z=(f-0.1055613458*h-0.0638541728*y)**3,C=(f-0.0894841775*h-1.291485548*y)**3,w=ka(4.0767416621*x-3.3077115913*z+0.2309699292*C),S=ka(-1.2684380046*x+2.6097574011*z-0.3413193965*C),E=ka(-0.0041960863*x-0.7034186147*z+1.707614701*C);return[w*255,S*255,E*255]};ze.oklch.oklab=function(o){return ze.lch.lab(o)};ze.lab.xyz=function(o){let f=o[0],h=o[1],y=o[2],x,z,C;z=(f+16)/116,x=h/500+z,C=z-y/200;let w=z**3,S=x**3,E=C**3;return z=w>Zn?w:(z-0.13793103448275862)/7.787,x=S>Zn?S:(x-0.13793103448275862)/7.787,C=E>Zn?E:(C-0.13793103448275862)/7.787,x*=95.047,z*=100,C*=108.883,[x,z,C]};ze.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 C=Math.sqrt(h*h+y*y);return[f,C,x]};ze.lch.lab=function(o){let f=o[0],h=o[1],x=o[2]/360*2*Math.PI,z=h*Math.cos(x),C=h*Math.sin(x);return[f,z,C]};ze.rgb.ansi16=function(o,f=null){let[h,y,x]=o,z=f===null?ze.rgb.hsv(o)[2]:f;if(z=Math.round(z/50),z===0)return 30;let C=30+(Math.round(x/255)<<2|Math.round(y/255)<<1|Math.round(h/255));if(z===2)C+=60;return C};ze.hsv.ansi16=function(o){return ze.rgb.ansi16(ze.hsv.rgb(o),o[2])};ze.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)};ze.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,z=(f>>2&1)*h*255;return[y,x,z]};ze.ansi256.rgb=function(o){if(o=o[0],o>=232){let z=(o-232)*10+8;return[z,z,z]}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]};ze.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};ze.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((w)=>w+w).join("");let y=Number.parseInt(h,16),x=y>>16&255,z=y>>8&255,C=y&255;return[x,z,C]};ze.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),z=Math.min(Math.min(f,h),y),C=x-z,w,S=C<1?z/(1-C):0;if(C<=0)w=0;else if(x===f)w=(h-y)/C%6;else if(x===h)w=2+(y-f)/C;else w=4+(f-h)/C;return w/=6,w%=1,[w*360,C*100,S*100]};ze.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]};ze.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]};ze.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],z=f%1*6,C=z%1,w=1-C,S=0;switch(Math.floor(z)){case 0:{x[0]=1,x[1]=C,x[2]=0;break}case 1:{x[0]=w,x[1]=1,x[2]=0;break}case 2:{x[0]=0,x[1]=1,x[2]=C;break}case 3:{x[0]=0,x[1]=w,x[2]=1;break}case 4:{x[0]=C,x[1]=0,x[2]=1;break}default:x[0]=1,x[1]=0,x[2]=w}return S=(1-h)*y,[(h*x[0]+S)*255,(h*x[1]+S)*255,(h*x[2]+S)*255]};ze.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]};ze.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]};ze.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]};ze.hwb.hcg=function(o){let f=o[1]/100,y=1-o[2]/100,x=y-f,z=0;if(x<1)z=(y-x)/(1-x);return[o[0],x*100,z*100]};ze.apple.rgb=function(o){return[o[0]/65535*255,o[1]/65535*255,o[2]/65535*255]};ze.rgb.apple=function(o){return[o[0]/255*65535,o[1]/255*65535,o[2]/255*65535]};ze.gray.rgb=function(o){return[o[0]/100*255,o[0]/100*255,o[0]/100*255]};ze.gray.hsl=function(o){return[0,0,o[0]]};ze.gray.hsv=ze.gray.hsl;ze.gray.hwb=function(o){return[0,100,o[0]]};ze.gray.cmyk=function(o){return[0,0,0,o[0]]};ze.gray.lab=function(o){return[o[0],0,0]};ze.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};ze.rgb.gray=function(o){return[(o[0]+o[1]+o[2])/3/255*100]};function yK(){let o={},f=Object.keys(ze);for(let{length:h}=f,y=0;y<h;y++)o[f[y]]={distance:-1,parent:null};return o}function bK(o){let f=yK(),h=[o];f[o].distance=0;while(h.length>0){let y=h.pop(),x=Object.keys(ze[y]);for(let{length:z}=x,C=0;C<z;C++){let w=x[C],S=f[w];if(S.distance===-1)S.distance=f[y].distance+1,S.parent=y,h.unshift(w)}}return f}function vK(o,f){return function(h){return f(o(h))}}function xK(o,f){let h=[f[o].parent,o],y=ze[f[o].parent][o],x=f[o].parent;while(f[x].parent)h.unshift(f[x].parent),y=vK(ze[f[x].parent][x],y),x=f[x].parent;return y.conversion=h,y}function _K(o){let f=bK(o),h={},y=Object.keys(f);for(let{length:x}=y,z=0;z<x;z++){let C=y[z];if(f[C].parent===null)continue;h[C]=xK(C,f)}return h}var _r={},zK=Object.keys(ze);function CK(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 wK(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:z}=x,C=0;C<z;C++)x[C]=Math.round(x[C]);return x};if("conversion"in o)f.conversion=o.conversion;return f}for(let o of zK){_r[o]={},Object.defineProperty(_r[o],"channels",{value:ze[o].channels}),Object.defineProperty(_r[o],"labels",{value:ze[o].labels});let f=_K(o),h=Object.keys(f);for(let y of h){let x=f[y];_r[o][y]=wK(x),_r[o][y].raw=CK(x)}}var kS=["keyword","gray","hex"],O0={};for(let o of Object.keys(_r))O0[[..._r[o].labels].sort().join("")]=o;var I0={};function mr(o,f){if(!(this instanceof mr))return new mr(o,f);if(f&&f in kS)f=null;if(f&&!(f in _r))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 mr)this.model=o.model,this.color=[...o.color],this.valpha=o.valpha;else if(typeof o==="string"){let x=gr.get(o);if(x===null)throw Error("Unable to parse color from string: "+o);this.model=x.model,y=_r[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=_r[this.model].channels;let x=Array.prototype.slice.call(o,0,y);this.color=R0(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 z=x.sort().join("");if(!(z in O0))throw Error("Unable to parse color from object: "+JSON.stringify(o));this.model=O0[z];let{labels:C}=_r[this.model],w=[];for(h=0;h<C.length;h++)w.push(o[C[h]]);this.color=R0(w)}if(I0[this.model]){y=_r[this.model].channels;for(h=0;h<y;h++){let x=I0[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)}mr.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(o){let f=this.model in gr.to?this:this.rgb();f=f.round(typeof o==="number"?o:1);let h=f.valpha===1?f.color:[...f.color,this.valpha];return gr.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 gr.to.rgb.percent(...h)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let o={},{channels:f}=_r[this.model],{labels:h}=_r[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 mr([...this.color.map(EK(o)),this.valpha],this.model)},alpha(o){if(o!==void 0)return new mr([...this.color,Math.max(0,Math.min(1,o))],this.model);return this.valpha},red:Qt("rgb",0,hr(255)),green:Qt("rgb",1,hr(255)),blue:Qt("rgb",2,hr(255)),hue:Qt(["hsl","hsv","hsl","hwb","hcg"],0,(o)=>(o%360+360)%360),saturationl:Qt("hsl",1,hr(100)),lightness:Qt("hsl",2,hr(100)),saturationv:Qt("hsv",1,hr(100)),value:Qt("hsv",2,hr(100)),chroma:Qt("hcg",1,hr(100)),gray:Qt("hcg",2,hr(100)),white:Qt("hwb",1,hr(100)),wblack:Qt("hwb",2,hr(100)),cyan:Qt("cmyk",0,hr(100)),magenta:Qt("cmyk",1,hr(100)),yellow:Qt("cmyk",2,hr(100)),black:Qt("cmyk",3,hr(100)),x:Qt("xyz",0,hr(95.047)),y:Qt("xyz",1,hr(100)),z:Qt("xyz",2,hr(108.833)),l:Qt("lab",0,hr(100)),a:Qt("lab",1),b:Qt("lab",2),keyword(o){if(o!==void 0)return new mr(o);return _r[this.model].keyword(this.color)},hex(o){if(o!==void 0)return new mr(o);return gr.to.hex(...this.rgb().round().color)},hexa(o){if(o!==void 0)return new mr(o);let f=this.rgb().round().color,h=Math.round(this.valpha*255).toString(16).toUpperCase();if(h.length===1)h="0"+h;return gr.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 mr.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,z=2*x-1,C=h.alpha()-y.alpha(),w=((z*C===-1?z:(z+C)/(1+z*C))+1)/2,S=1-w;return mr.rgb(w*h.red()+S*y.red(),w*h.green()+S*y.green(),w*h.blue()+S*y.blue(),h.alpha()*x+y.alpha()*(1-x))}};for(let o of Object.keys(_r)){if(kS.includes(o))continue;let{channels:f}=_r[o];mr.prototype[o]=function(...h){if(this.model===o)return new mr(this);if(h.length>0)return new mr(h,o);return new mr([...TK(_r[this.model][o].raw(this.color)),this.valpha],o)},mr[o]=function(...h){let y=h[0];if(typeof y==="number")y=R0(h,f);return new mr(y,o)}}function SK(o,f){return Number(o.toFixed(f))}function EK(o){return function(f){return SK(f,o)}}function Qt(o,f,h){o=Array.isArray(o)?o:[o];for(let y of o)(I0[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 hr(o){return function(f){return Math.max(0,Math.min(o,f))}}function TK(o){return Array.isArray(o)?o:[o]}function R0(o,f){for(let h=0;h<f;h++)if(typeof o[h]!=="number")o[h]=0;return o}function kK(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var OK=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},SS=kK(OK);function IK(o,f){let h=o.split(f||":"),y=SS(h[0]);if(!h.length)return y;for(let x=0,z=h.length-1;x<z;x++)y=mr(y).mix(mr(SS(h[x+1]))).saturate(1).hex();return y}OS.exports=IK});var AS=i(function(mRe,RS){function rn(o,f){if(f)return new rn(o).style(f);if(!(this instanceof rn))return new rn(o);this.text=o}rn.prototype.prefix="\x1B[";rn.prototype.suffix="m";rn.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)]};rn.prototype.rgb=function(f,h,y){var x=f/255*5,z=h/255*5,C=y/255*5;return this.ansi(x,z,C)};rn.prototype.ansi=function(f,h,y){var x=Math.round(f),z=Math.round(h),C=Math.round(y);return 16+x*36+z*6+C};rn.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};rn.prototype.style=function(f){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(f))+this.suffix+this.text+this.reset()};RS.exports=rn});var DS=i(function(gRe,PS){var RK=IS(),AK=AS();PS.exports=function(f,h){var y=h.namespace,x=h.colors!==!1?AK(y+":",RK(y)):y+":";return f[0]=x+" "+f[0],f}});var LS=i(function(yRe,BS){BS.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 jS=i(function(bRe,NS){var PK=LS();NS.exports=function(f){return function(y){try{return PK(y,f())}catch(x){}return!1}}});var qS=i(function(vRe,MS){var DK=jS();MS.exports=DK(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var US=i(function(xRe,FS){FS.exports=function(o,f){try{Function.prototype.apply.call(console.log,console,f)}catch(h){}}});var ul=i(function(_Re,$S){var BK=wS(),LK=c("tty").isatty(1),Xd=BK(function o(f,h){if(h=h||{},h.colors="colors"in h?h.colors:LK,h.namespace=f,h.prod=!1,h.dev=!0,!o.enabled(f)&&!(h.force||o.force))return o.nope(h);return o.yep(h)});Xd.modify(DS());Xd.use(qS());Xd.set(US());$S.exports=Xd});var HS=i(function(zRe,VS){var A0=c("fs"),{StringDecoder:NK}=c("string_decoder"),{Stream:jK}=hs();function MK(){}VS.exports=(o,f)=>{let h=Buffer.alloc(65536),y=new NK("utf8"),x=new jK,z="",C=0,w=0;if(o.start===-1)delete o.start;if(x.readable=!0,x.destroy=()=>{x.destroyed=!0,x.emit("end"),x.emit("close")},A0.open(o.file,"a+","0644",(S,E)=>{if(S){if(!f)x.emit("error",S);else f(S);x.destroy();return}(function T(){if(x.destroyed){A0.close(E,MK);return}return A0.read(E,h,0,h.length,C,(k,O)=>{if(k){if(!f)x.emit("error",k);else f(k);x.destroy();return}if(!O){if(z){if(o.start==null||w>o.start)if(!f)x.emit("line",z);else f(null,z);w++,z=""}return setTimeout(T,1000)}let R=y.write(h.slice(0,O));if(!f)x.emit("data",R);R=(z+R).split(/\n+/);let I=R.length-1,A=0;for(;A<I;A++){if(o.start==null||w>o.start)if(!f)x.emit("line",R[A]);else f(null,R[A]);w++}return z=R[I],C+=O,T()})})()}),!f)return x;return x.destroy}});var JS=i(function(CRe,WS){var po=c("fs"),zr=c("path"),GS=dS(),qK=c("zlib"),{MESSAGE:FK}=cr(),{Stream:UK,PassThrough:KS}=hs(),$K=wa(),on=ul()("winston:file"),VK=c("os"),HK=HS();WS.exports=class extends $K{constructor(f={}){super(f);this.name=f.name||"file";function h(y,...x){x.slice(1).forEach((z)=>{if(f[z])throw Error(`Cannot set ${z} and ${y} together`)})}if(this._stream=new KS,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?zr.basename(f.filename):"winston.log",this.dirname=f.dirname||zr.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=zr.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:VK.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[FK]}${this.eol}`,x=Buffer.byteLength(y);function z(){if(this._size+=x,this._pendingSize-=x,on("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 C=this._stream.write(y,z.bind(this));if(!C)this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,h()});else h();return on("written",C,this._drain),this.finishIfEnding(),C}query(f,h){if(typeof f==="function")h=f,f={};f=k(f);let y=zr.join(this.dirname,this.filename),x="",z=[],C=0,w=po.createReadStream(y,{encoding:"utf8"});w.on("error",(O)=>{if(w.readable)w.destroy();if(!h)return;return O.code!=="ENOENT"?h(O):h(null,z)}),w.on("data",(O)=>{O=(x+O).split(/\n+/);let R=O.length-1,I=0;for(;I<R;I++){if(!f.start||C>=f.start)S(O[I]);C++}x=O[R]}),w.on("close",()=>{if(x)S(x,!0);if(f.order==="desc")z=z.reverse();if(h)h(null,z)});function S(O,R){try{let I=JSON.parse(O);if(T(I))E(I)}catch(I){if(!R)w.emit("error",I)}}function E(O){if(f.rows&&z.length>=f.rows&&f.order!=="desc"){if(w.readable)w.destroy();return}if(f.fields)O=f.fields.reduce((R,I)=>(R[I]=O[I],R),{});if(f.order==="desc"){if(z.length>=f.rows)z.shift()}z.push(O)}function T(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=zr.join(this.dirname,this.filename),y=new UK,x={file:h,start:f.start};return y.destroy=HK(x,(z,C)=>{if(z)return y.emit("error",z);try{y.emit("data",C),C=JSON.parse(C),y.emit("log",C)}catch(w){y.emit("error",w)}}),y}open(){if(!this.filename)return;if(this._opening)return;this._opening=!0,this.stat((f,h)=>{if(f)return this.emit("error",f);on("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=zr.join(this.dirname,h);po.stat(y,(x,z)=>{if(x&&x.code==="ENOENT")return on("ENOENT ok",y),this.filename=h,f(null,0);if(x)return on(`err ${x.code} ${y}`),f(x);if(!z||this._needsNewFile(z.size))return this._incFile(()=>this.stat(f));this.filename=h,f(null,z.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=zr.join(this.dirname,this.filename);on("create stream start",h,this.options);let y=po.createWriteStream(h,this.options).on("error",(x)=>on(x)).on("close",()=>on("close",y.path,y.bytesWritten)).on("open",()=>{if(on("file open ok",h),this.emit("open",h),f.pipe(y),this.rotatedWhileOpening)this._stream=new KS,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(y),f.end()});return on("create stream ok",h),y}_incFile(f){on("_incFile",this.filename);let h=zr.extname(this._basename),y=zr.basename(this._basename,h),x=[];if(this.zippedArchive)x.push(function(z){let C=this._created>0&&!this.tailable?this._created:"";this._compressFile(zr.join(this.dirname,`${y}${C}${h}`),zr.join(this.dirname,`${y}${C}${h}.gz`),z)}.bind(this));x.push(function(z){if(!this.tailable)this._created+=1,this._checkMaxFilesIncrementing(h,y,z);else this._checkMaxFilesTailable(h,y,z)}.bind(this)),GS(x,f)}_getFile(){let f=zr.extname(this._basename),h=zr.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,z=x!==0?x:"",C=this.zippedArchive?".gz":"",w=`${h}${z}${f}${C}`,S=zr.join(this.dirname,w);po.unlink(S,y)}_checkMaxFilesTailable(f,h,y){let x=[];if(!this.maxFiles)return;let z=this.zippedArchive?".gz":"";for(let C=this.maxFiles-1;C>1;C--)x.push(function(w,S){let E=`${h}${w-1}${f}${z}`,T=zr.join(this.dirname,E);po.exists(T,(k)=>{if(!k)return S(null);E=`${h}${w}${f}${z}`,po.rename(T,zr.join(this.dirname,E),S)})}.bind(this,C));GS(x,()=>{po.rename(zr.join(this.dirname,`${h}${f}${z}`),zr.join(this.dirname,`${h}1${f}${z}`),y)})}_compressFile(f,h,y){po.access(f,po.F_OK,(x)=>{if(x)return y();var z=qK.createGzip(),C=po.createReadStream(f),w=po.createWriteStream(h);w.on("finish",()=>{po.unlink(f,y)}),C.pipe(z).pipe(w)})}_createLogDirIfNotExist(f){if(!po.existsSync(f))po.mkdirSync(f,{recursive:!0})}}});var YS=i(function(wRe,ZS){var GK=c("http"),KK=c("https"),{Stream:WK}=hs(),JK=wa(),{configure:ZK}=ba();ZS.exports=class extends JK{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,w)=>{if(C&&C.statusCode!==200)z=Error(`Invalid HTTP Status Code: ${C.statusCode}`);if(z)return h(z);if(typeof w==="string")try{w=JSON.parse(w)}catch(S){return h(S)}h(null,w)})}stream(f={}){let h=new WK;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="",C=this._request(f,x,y);return h.destroy=()=>C.destroy(),C.on("data",(w)=>{w=(z+w).split(/\n+/);let S=w.length-1,E=0;for(;E<S;E++)try{h.emit("log",JSON.parse(w[E]))}catch(T){h.emit("error",T)}z=w[S]}),C.on("error",(w)=>h.emit("error",w)),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 z=this;this.batchCallback=h,this.batchTimeoutID=setTimeout(function(){z.batchTimeoutID=-1,z._doBatchRequest(z.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 z=Object.assign({},this.headers);if(y&&y.bearer)z.Authorization=`Bearer ${y.bearer}`;let C=(this.ssl?KK:GK).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${x.replace(/^\//,"")}`,headers:z,auth:y&&y.username&&y.password?`${y.username}:${y.password}`:"",agent:this.agent});C.on("error",h),C.on("response",(S)=>S.on("end",()=>h(null,S)).resume());let w=ZK({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});C.end(Buffer.from(w(f,this.options.replacer),"utf8"))}}});var P0=i(function(SRe,XS){var Sn=(o)=>o!==null&&typeof o==="object"&&typeof o.pipe==="function";Sn.writable=(o)=>Sn(o)&&o.writable!==!1&&typeof o._write==="function"&&typeof o._writableState==="object";Sn.readable=(o)=>Sn(o)&&o.readable!==!1&&typeof o._read==="function"&&typeof o._readableState==="object";Sn.duplex=(o)=>Sn.writable(o)&&Sn.readable(o);Sn.transform=(o)=>Sn.duplex(o)&&typeof o._transform==="function";XS.exports=Sn});var eE=i(function(ERe,QS){var YK=P0(),{MESSAGE:XK}=cr(),QK=c("os"),eW=wa();QS.exports=class extends eW{constructor(f={}){super(f);if(!f.stream||!YK(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:QK.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[XK]}${this.eol}`),h)h();return}}});var tE=i(function(dl){Object.defineProperty(dl,"Console",{configurable:!0,enumerable:!0,get(){return Ew()}});Object.defineProperty(dl,"File",{configurable:!0,enumerable:!0,get(){return JS()}});Object.defineProperty(dl,"Http",{configurable:!0,enumerable:!0,get(){return YS()}});Object.defineProperty(dl,"Stream",{configurable:!0,enumerable:!0,get(){return eE()}})});var ep=i(function(tW){var Qd=Sg(),{configs:D0}=cr();tW.cli=Qd.levels(D0.cli);tW.npm=Qd.levels(D0.npm);tW.syslog=Qd.levels(D0.syslog);tW.addColors=Qd.levels});var oE=i(function(B0,rE){Object.defineProperty(B0,"__esModule",{value:!0});var sW=Kd(),aW=ms(sW),cW=Wd(),lW=ms(cW),uW=b0(),dW=ms(uW),pW=c0(),fW=ms(pW),hW=p0(),mW=ms(hW),gW=fs(),yW=ms(gW),bW=Ea(),vW=ms(bW);function ms(o){return o&&o.__esModule?o:{default:o}}function xW(o,f,h){h=(0,fW.default)(h);var y=0,x=0,{length:z}=o,C=!1;if(z===0)h(null);function w(S,E){if(S===!1)C=!0;if(C===!0)return;if(S)h(S);else if(++x===z||E===lW.default)h(null)}for(;y<z;y++)f(o[y],y,(0,mW.default)(w))}function _W(o,f,h){return(0,dW.default)(o,1/0,f,h)}function zW(o,f,h){var y=(0,aW.default)(o)?xW:_W;return y(o,(0,yW.default)(f),h)}B0.default=(0,vW.default)(zW,3);rE.exports=B0.default});var iE=i(function(L0,nE){Object.defineProperty(L0,"__esModule",{value:!0});L0.default=wW;function wW(o){return(f,h,y)=>o(f,y)}nE.exports=L0.default});var rp=i(function(N0,sE){Object.defineProperty(N0,"__esModule",{value:!0});var EW=oE(),TW=tp(EW),kW=iE(),OW=tp(kW),IW=fs(),RW=tp(IW),AW=Ea(),PW=tp(AW);function tp(o){return o&&o.__esModule?o:{default:o}}function DW(o,f,h){return(0,TW.default)(o,(0,OW.default)((0,RW.default)(f)),h)}N0.default=(0,PW.default)(DW,3);sE.exports=N0.default});var cE=i(function(ORe,aE){var LW=Object.prototype.toString;aE.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=LW.call(f).slice(8,-1);if(y==="Function")h=h.substring(h.indexOf("(")+1,h.indexOf(")"));else h=y;return h||"anonymous"}});var j0=i(function(IRe,lE){var NW=cE();lE.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=NW(f),x}});var M0=i(function(qW){qW.get=function(o){var f=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var h={},y=Error.prepareStackTrace;Error.prepareStackTrace=function(z,C){return C},Error.captureStackTrace(h,o||qW.get);var x=h.stack;return Error.prepareStackTrace=y,Error.stackTraceLimit=f,x};qW.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 z=null,C=null,w=null,S=null,E=null,T=x[5]==="native";if(x[1]){w=x[1];var k=w.lastIndexOf(".");if(w[k-1]==".")k--;if(k>0){z=w.substr(0,k),C=w.substr(k+1);var O=z.indexOf(".Module");if(O>0)w=w.substr(O+1),z=z.substr(0,O)}S=null}if(C)S=z,E=C;if(C==="<anonymous>")E=null,w=null;var R={fileName:x[2]||null,lineNumber:parseInt(x[3],10)||null,functionName:w,typeName:S,methodName:E,columnNumber:parseInt(x[4],10)||null,native:T};return f._createParsedCallSite(R)}).filter(function(y){return!!y})};function pl(o){for(var f in o)this[f]=o[f]}var jW=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],MW=["topLevel","eval","native","constructor"];jW.forEach(function(o){pl.prototype[o]=null,pl.prototype["get"+o[0].toUpperCase()+o.substr(1)]=function(){return this[o]}});MW.forEach(function(o){pl.prototype[o]=!1,pl.prototype["is"+o[0].toUpperCase()+o.substr(1)]=function(){return this[o]}});qW._createParsedCallSite=function(o){return new pl(o)}});var pE=i(function(ARe,dE){var{Writable:$W}=hs();dE.exports=class extends $W{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 F0=i(function(PRe,mE){var fE=c("os"),VW=rp(),q0=ul()("winston:exception"),HW=j0(),hE=M0(),GW=pE();mE.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:fE.loadavg(),uptime:fE.uptime()}}getTrace(f){return(f?hE.parse(f):hE.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 GW(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,z;if(!y.length&&x)console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),x=!1;function C(){if(q0("doExit",x),q0("process._exiting",process._exiting),x&&!process._exiting){if(z)clearTimeout(z);process.exit(1)}}if(!y||y.length===0)return process.nextTick(C);if(VW(y,(w,S)=>{let E=HW(S),T=w.transport||w;function k(O){return()=>{q0(O),E()}}T._ending=!0,T.once("finish",k("finished")),T.once("error",k("error"))},()=>x&&C()),this.logger.log(h),x)z=setTimeout(C,3000)}_getExceptionHandlers(){return this.logger.transports.filter((f)=>(f.transport||f).handleExceptions)}}});var yE=i(function(DRe,gE){var{Writable:KW}=hs();gE.exports=class extends KW{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 $0=i(function(BRe,xE){var bE=c("os"),WW=rp(),U0=ul()("winston:rejection"),JW=j0(),vE=M0(),ZW=yE();xE.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:bE.loadavg(),uptime:bE.uptime()}}getTrace(f){return(f?vE.parse(f):vE.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 ZW(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,z;if(!y.length&&x)console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),x=!1;function C(){if(U0("doExit",x),U0("process._exiting",process._exiting),x&&!process._exiting){if(z)clearTimeout(z);process.exit(1)}}if(!y||y.length===0)return process.nextTick(C);if(WW(y,(w,S)=>{let E=JW(S),T=w.transport||w;function k(O){return()=>{U0(O),E()}}T._ending=!0,T.once("finish",k("finished")),T.once("error",k("error"))},()=>x&&C()),this.logger.log(h),x)z=setTimeout(C,3000)}_getRejectionHandlers(){return this.logger.transports.filter((f)=>(f.transport||f).handleRejections)}}});var CE=i(function(LRe,zE){class _E{constructor(o){let f=op();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)}}zE.exports=_E});var op=i(function(NRe,TE){var{Stream:YW,Transform:XW}=hs(),wE=rp(),{LEVEL:En,SPLAT:SE}=cr(),EE=P0(),QW=F0(),eJ=$0(),tJ=Qg(),rJ=CE(),{warn:oJ}=Tg(),nJ=ep(),iJ=/%[scdjifoO%]/g;class V0 extends XW{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:z=!0,transports:C,colors:w,emitErrs:S,formatters:E,padLevels:T,rewriters:k,stripColors:O,exceptionHandlers:R,rejectionHandlers:I}={}){if(this.transports.length)this.clear();if(this.silent=o,this.format=f||this.format||_g()(),this.defaultMeta=h||null,this.levels=y||this.levels||nJ.npm.levels,this.level=x,this.exceptions)this.exceptions.unhandle();if(this.rejections)this.rejections.unhandle();if(this.exceptions=new QW(this),this.rejections=new eJ(this),this.profilers={},this.exitOnError=z,C)C=Array.isArray(C)?C:[C],C.forEach((A)=>this.add(A));if(w||S||E||T||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=fl(this.levels,this.level);if(!this.transports||this.transports.length===0)return o;return this.transports.reduce((f,h)=>{let y=fl(this.levels,h.level);return y!==null&&y>f?y:f},o)}isLevelEnabled(o){let f=fl(this.levels,o);if(f===null)return!1;let h=fl(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 z=fl(this.levels,x.level);if(z===null)z=h;return z>=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(iJ))){let z=Object.assign({},this.defaultMeta,y,{[En]:o,[SE]:h,level:o,message:f});if(y.message)z.message=`${z.message} ${y.message}`;if(y.stack)z.stack=y.stack;if(y.cause)z.cause=y.cause;return this.write(z),this}}return this.write(Object.assign({},this.defaultMeta,{[En]:o,[SE]: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();wE(f,(h,y)=>{if(!h||h.finished)return setImmediate(y);h.once("finish",y),h.end()},o)}add(o){let f=!EE(o)||o.log.length>2?new tJ({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(!EE(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(){oJ.deprecated("setLevels")}query(o,f){if(typeof o==="function")f=o,o={};o=o||{};let h={},y=Object.assign({},o.query||{});function x(C,w){if(o.query&&typeof C.formatQuery==="function")o.query=C.formatQuery(y);C.query(o,(S,E)=>{if(S)return w(S);if(typeof C.formatResults==="function")E=C.formatResults(E,o.format);w(null,E)})}function z(C,w){x(C,(S,E)=>{if(w){if(E=S||E,E)h[C.name]=E;w()}w=null})}wE(this.transports.filter((C)=>!!C.query),z,()=>f(null,h))}stream(o={}){let f=new YW,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",(z)=>{z.transport=z.transport||[],z.transport.push(y.name),f.emit("log",z)}),x.on("error",(z)=>{z.transport=z.transport||[],z.transport.push(y.name),f.emit("error",z)})}),f}startTimer(){return new rJ(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 fl(o,f){let h=o[f];if(!h&&h!==0)return null;return h}Object.defineProperty(V0.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:o}=this._readableState;return!Array.isArray(o)?[o].filter(Boolean):o}});TE.exports=V0});var H0=i(function(jRe,kE){var{LEVEL:sJ}=cr(),aJ=ep(),cJ=op(),lJ=ul()("winston:create-logger");function uJ(o){return"is"+o.charAt(0).toUpperCase()+o.slice(1)+"Enabled"}kE.exports=function(o={}){o.levels=o.levels||aJ.npm.levels;class f extends cJ{constructor(y){super(y)}}let h=new f(o);return Object.keys(o.levels).forEach(function(y){if(lJ('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 z=this||h;if(x.length===1){let[C]=x,w=C&&C.message&&C||{message:C};return w.level=w[sJ]=y,z._addDefaultMeta(w),z.write(w),this||h}if(x.length===0)return z.log(y,""),z;return z.log(y,...x)},f.prototype[uJ(y)]=function(){return(this||h).isLevelEnabled(y)}}),h}});var IE=i(function(MRe,OE){var dJ=H0();OE.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=dJ(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 np=i(function(So){var RE=Sg(),{warn:hl}=Tg();So.version=OC().version;So.transports=tE();So.config=ep();So.addColors=RE.levels;So.format=RE.format;So.createLogger=H0();So.Logger=op();So.ExceptionHandler=F0();So.RejectionHandler=$0();So.Container=IE();So.Transport=wa();So.loggers=new So.Container;var Tn=So.createLogger();Object.keys(So.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach((o)=>So[o]=(...f)=>Tn[o](...f));Object.defineProperty(So,"level",{get(){return Tn.level},set(o){Tn.level=o}});Object.defineProperty(So,"exceptions",{get(){return Tn.exceptions}});Object.defineProperty(So,"rejections",{get(){return Tn.rejections}});["exitOnError"].forEach((o)=>{Object.defineProperty(So,o,{get(){return Tn[o]},set(f){Tn[o]=f}})});Object.defineProperty(So,"default",{get(){return{exceptionHandlers:Tn.exceptionHandlers,rejectionHandlers:Tn.rejectionHandlers,transports:Tn.transports}}});hl.deprecated(So,"setLevels");hl.forFunctions(So,"useFormat",["cli"]);hl.forProperties(So,"useFormat",["padLevels","stripColors"]);hl.forFunctions(So,"deprecated",["addRewriter","addFilter","clone","extend"]);hl.forProperties(So,"deprecated",["emitErrs","levelLength"])});var K0=i(function(NE){Object.defineProperty(NE,"__esModule",{value:!0});NE.local=void 0;NE.getMessageOrStack=LE;var G0=c("node:util"),BE=np(),{combine:_J,timestamp:zJ,cli:CJ,printf:wJ,errors:SJ}=BE.format;NE.local=_J(SJ({stack:!0}),zJ(),BE.format(EJ)(),CJ(),wJ((o)=>{let f=o.custom_fields&&typeof o.custom_fields==="object"&&"messageContext"in o.custom_fields?`${G0.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=G0.styleText("inverse",o.level);return`${G0.styleText("gray",`[${o.timestamp}]`)} ${o.level} ${f.padStart(x," ")}${y}`}));function LE(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 EJ(o){return{...o,level:o.level.toUpperCase(),message:LE(o)}}});var UE=i(function(qE){Object.defineProperty(qE,"__esModule",{value:!0});qE.kibana=void 0;var ME=np(),kJ=K0(),{combine:OJ,timestamp:IJ,json:RJ,errors:AJ}=ME.format;qE.kibana=OJ(AJ({stack:!0}),IJ(),ME.format(PJ)(),RJ());function PJ(o){return{...o,msg:kJ.getMessageOrStack(o),written_ts:new Date(o.timestamp).getTime(),written_at:o.timestamp}}});var W0=i(function(_i){var DJ=_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]}),$E=_i&&_i.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))DJ(f,o,h)};Object.defineProperty(_i,"__esModule",{value:!0});$E(UE(),_i);$E(K0(),_i)});var tT=i(function(eT){Object.defineProperty(eT,"__esModule",{value:!0});eT.cloudSdkExceptionLogger=eT.logFormat=void 0;eT.muteLoggers=LJ;eT.unmuteLoggers=NJ;eT.disableExceptionLogger=YE;eT.enableExceptionLogger=jJ;eT.createLogger=XE;eT.getLogger=MJ;eT.setLogLevel=qJ;eT.setGlobalLogLevel=FJ;eT.getGlobalLogLevel=UJ;eT.setGlobalTransports=$J;eT.setLogFormat=VJ;eT.setGlobalLogFormat=HJ;eT.getGlobalLogFormat=GJ;eT.sanitizeRecord=ZJ;eT.resetCustomLogLevels=YJ;eT.resetCustomLogFormats=XJ;var J0=np(),VE=W0(),HE="sap-cloud-sdk-logger",BJ="sap-cloud-sdk-exception-logger",nr=new J0.Container;eT.logFormat={kibana:VE.kibana,local:VE.local};nr.options.format=eT.logFormat.local;var GE=new J0.transports.Console,ip={},sp={},Z0="__DEFAULT_LOGGER__MESSAGE_CONTEXT",KE=!1,WE=XE({package:"util",messageContext:"cloud-sdk-logger"});function JE(o){KE=o,nr.loggers.forEach((f)=>ZE(f,o))}function ZE(o,f){o.transports.forEach((h)=>h.silent=f)}function LJ(){JE(!0)}function NJ(){JE(!1)}eT.cloudSdkExceptionLogger=nr.get(BJ,{defaultMeta:{logger:HE,test:"exception"},format:nr.options.format,exceptionHandlers:[GE]});function YE(){eT.cloudSdkExceptionLogger.exceptions.unhandle()}function jJ(){YE(),eT.cloudSdkExceptionLogger.exceptions.handle(GE)}function XE(o){let f=typeof o==="string"?{messageContext:o}:{...o},h=nr.get(f.messageContext,{level:process.env.SAP_CLOUD_SDK_LOG_LEVEL||ip[f.messageContext]||f.level||nr.options.level||"info",defaultMeta:{...Object.entries(f).length&&{custom_fields:f},logger:f.logger||HE},format:sp[f.messageContext]||f.format||nr.options.format||eT.logFormat.local,transports:[new J0.transports.Console]});return ZE(h,KE),h}function MJ(o=Z0){if(nr.has(o))return nr.get(o)}function qJ(o,f=Z0){let h=typeof f==="string"?f:QE(f);if(h){if(ip[h]=o,nr.has(h)){let y=nr.get(h);y.level=o}}else if(typeof f!=="string")WE.warn("Setting log level for logger with unknown message context"),f.level=o}function FJ(o){nr.options.level=o,nr.loggers.forEach((f)=>{f.level=o})}function UJ(){return nr.options.level}function $J(o){nr.options.transports=o,nr.loggers.forEach((f)=>(f.clear(),Array.isArray(o)?o.forEach((h)=>f.add(h)):f.add(o)))}function VJ(o,f=Z0){let h=typeof f==="string"?f:QE(f);if(h){if(sp[h]=o,nr.has(h)){let y=nr.get(h);y.format=o}}else if(typeof f!=="string")WE.warn("Setting log format for logger with unknown message context"),f.format=o}function HJ(o){nr.options.format=o,nr.loggers.forEach((f)=>{f.format=o})}function GJ(){return nr.options.format}var KJ=["access_token","authentication","authorization","apiKey","credentials","csrf","xsrf","secret","password","JTENANT","JSESSION"];function WJ(o,f,h){let y=h.map((z)=>z.toLowerCase()),x=JJ(o,f)?f:o;return y.some((z)=>x.toLowerCase().includes(z))}function JJ(o,f){return o.toLowerCase()==="cookie"&&typeof f==="string"}function ZJ(o,f="<DATA NOT LOGGED TO PREVENT LEAKING SENSITIVE DATA>",h=KJ){return Object.fromEntries(Object.entries(o).map(([y,x])=>WJ(y,x,h)?[y,f]:[y,x]))}function QE(o){let f=o;if(f&&f.defaultMeta&&f.defaultMeta.custom_fields)return f.defaultMeta.custom_fields.messageContext}function YJ(){Object.keys(ip).forEach((o)=>delete ip[o])}function XJ(){Object.keys(sp).forEach((o)=>delete sp[o])}});var ml=i(function(zi){var mZ=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]}),rT=zi&&zi.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))mZ(f,o,h)};Object.defineProperty(zi,"__esModule",{value:!0});rT(tT(),zi);rT(W0(),zi)});var nT=i(function(oT){Object.defineProperty(oT,"__esModule",{value:!0});oT.documentationBlock=vZ;var gZ=Td(),yZ=ml(),bZ=yZ.createLogger("documentation-block");function vZ(o,...f){let h=xZ(o.raw[0]),y=CZ(h),x=_Z(f,y),z=gZ.zip([h,...o.raw.slice(1)],x).join("");if(!z.match(/\w/))return"";z=wZ(z);let C=z.split(`
42
+ `);return C=zZ(C,y),z=C.join(`
43
+ * `),["/**",` * ${z}`," */"].join(`
44
+ `)}function xZ(o){let f=o.split(`
45
+ `),h=f.findIndex((y)=>y.match(/\w/))||0;return f.splice(h).join(`
46
+ `)}function _Z(o,f){return o.map((y)=>y.replace(/\n/g,`
47
+ `+" ".repeat(f)))}function zZ(o,f){return o.map((h)=>h.slice(f))}function CZ(o){let h=o?.replace(/^\n*/g,"")?.search(/\S/);return h>0?h:0}function wZ(o){if(o.includes("*/"))bZ.warn(`The documentation block ${o}'
48
+ )} contained */ in the text will be masked as \\*\\/.`);return o.replace(/\*\//g,"\\*\\/")}});var cp=i(function(iT){Object.defineProperty(iT,"__esModule",{value:!0});iT.isNullish=EZ;function EZ(o){return o===null||o===void 0}});var uT=i(function(lT){Object.defineProperty(lT,"__esModule",{value:!0});lT.equalObjects=aT;lT.equal=X0;lT.equalArrays=cT;var sT=cp();function aT(o,f){let h=Object.keys(o);return Object.keys(o).length===Object.keys(f).length&&h.every((y)=>X0(o[y],f[y]))}function X0(o,f){if(Array.isArray(o)&&Array.isArray(f))return cT(o,f);if(typeof o==="object"&&typeof f==="object"&&!sT.isNullish(o)&&!sT.isNullish(f))return aT(o,f);return o===f}function cT(o,f){return o.length===f.length&&o.every((h,y)=>X0(h,f[y]))}});var mT=i(function(fT){Object.defineProperty(fT,"__esModule",{value:!0});fT.ErrorWithCause=void 0;fT.isErrorWithCause=pT;var RZ=ml(),AZ=RZ.createLogger({package:"util",messageContext:"error-with-cause"});class dT 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){AZ.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 pT(this.cause)?this.cause.rootCause:this.cause}}fT.ErrorWithCause=dT;function pT(o){return o?.name==="ErrorWithCause"}});var bT=i(function(yT){Object.defineProperty(yT,"__esModule",{value:!0});yT.findProjectRoot=gT;yT.readJSON=NZ;var lp=c("fs"),DZ=c("path"),BZ=ml(),LZ=BZ.createLogger({package:"util",messageContext:"fs"});function gT(o,f=o){if(!o)return f;if(!(lp.readdirSync(o).includes("package.json")||lp.readdirSync(o).includes("node_modules")||o.includes("node_modules")))return f;return gT(DZ.resolve(o,".."),o)}function NZ(o){if(lp.existsSync(o))return JSON.parse(lp.readFileSync(o,"utf8"));return LZ.warn(`File "${o}" does not exist, return empty object.`),{}}});var wT=i(function(zT){Object.defineProperty(zT,"__esModule",{value:!0});zT.exclude=zT.pick=zT.renameKeys=void 0;zT.propertyExists=vT;zT.toSanitizedObject=$Z;zT.pickIgnoreCase=Q0;zT.pickValueIgnoreCase=xT;zT.pickNonNullish=VZ;zT.mergeLeftIgnoreCase=_T;zT.mergeIgnoreCase=HZ;var up=cp();function vT(o,...f){if(!f.length)return!0;if(o&&o.hasOwnProperty(f[0]))return vT(o[f[0]],...f.slice(1));return!1}var qZ=(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,z])=>({...y,[z]:f[x]}),h)};zT.renameKeys=qZ;var FZ=(o,f)=>{let h={};return o.forEach((y)=>{let x=f[y];if(Object.keys(f).includes(y))h[y]=x}),h};zT.pick=FZ;var UZ=(o,f)=>{let h={};return Object.keys(f).forEach((y)=>{let x=f[y];if(!o.includes(y))h[y]=x}),h};zT.exclude=UZ;function $Z(o,f){return up.isNullish(o)||up.isNullish(f)?{}:{[o]:f}}function Q0(o={},...f){return f.reduce((h,y)=>{let x=Object.keys(o).find((z)=>z.toLowerCase()===y.toLowerCase());return{...h,...x&&{[x]:o[x]}}},{})}function xT(o={},f){return Object.values(Q0(o,f))[0]}function VZ(o={}){return Object.entries(o).filter(([f,h])=>!up.isNullish(f)&&!up.isNullish(h)).reduce((f,[h,y])=>({...f,[h]:y}),{})}function _T(o={},f={}){return Object.entries(o).map(([h,y])=>xT(f,h)?Q0(f,h):{[h]:y}).reduce((h,y)=>({...h,...y}),{})}function HZ(o={},f={}){return{..._T(o,f),...f}}});var ET=i(function(ST){Object.defineProperty(ST,"__esModule",{value:!0});ST.identity=tY;function tY(o){return o}});var kT=i(function(TT){Object.defineProperty(TT,"__esModule",{value:!0});TT.finishAll=oY;async function oY(o,f){let y=(await Promise.allSettled(o)).filter((x)=>x.status==="rejected");if(y.length){let x=y.map((C)=>` ${C.reason}`).join(`
55
+ `),z=f?`${f} `:"";throw Error(`${z}Errors: [
56
+ ${x}
57
+ ]`)}}});var AT=i(function(RT){Object.defineProperty(RT,"__esModule",{value:!0});RT.removeSlashes=iY;RT.removeTrailingSlashes=OT;RT.removeLeadingSlashes=IT;function iY(o){return o=IT(o),o=OT(o),o}function OT(o){return o.endsWith("/")?o.slice(0,-1):o}function IT(o){return o.startsWith("/")?o.slice(1):o}});var PT=i(function(ey,ty){/*!
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 ey==="object"&&typeof ty<"u"?ty.exports=f():typeof define==="function"&&define.amd?define(f):(o=o||self,o.v=f())})(ey,function(){function o(){return o=Object.assign||function(M){for(var U=1;U<arguments.length;U++){var H=arguments[U];for(var Q in H)if(Object.prototype.hasOwnProperty.call(H,Q))M[Q]=H[Q]}return M},o.apply(this,arguments)}function f(M,U){return x(M)||C(M,U)||S()}function h(M){return y(M)||z(M)||w()}function y(M){if(Array.isArray(M)){for(var U=0,H=Array(M.length);U<M.length;U++)H[U]=M[U];return H}}function x(M){if(Array.isArray(M))return M}function z(M){if(Symbol.iterator in Object(M)||Object.prototype.toString.call(M)==="[object Arguments]")return Array.from(M)}function C(M,U){if(!((Symbol.iterator in Object(M))||Object.prototype.toString.call(M)==="[object Arguments]"))return;var H=[],Q=!0,ie=!1,be=void 0;try{for(var Be=M[Symbol.iterator](),Tt;!(Q=(Tt=Be.next()).done);Q=!0)if(H.push(Tt.value),U&&H.length===U)break}catch(dt){ie=!0,be=dt}finally{try{if(!Q&&Be.return!=null)Be.return()}finally{if(ie)throw be}}return H}function w(){throw TypeError("Invalid attempt to spread non-iterable instance")}function S(){throw TypeError("Invalid attempt to destructure non-iterable instance")}function E(M){return M===void 0||M===null}function T(M){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(E(M))return U;return Boolean(M)}function k(M){return typeof M==="string"}function O(M){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(E(M))return U;if(k(M))return M;return String(M)}function R(M,U){var H=O(M),Q=T(U);if(H==="")return"";if(Q)H=H.toLowerCase();return H.substr(0,1).toUpperCase()+H.substr(1)}function I(M){var U=O(M,"");return U.toLowerCase()}var A="\\d",j="\\s\\uFEFF\\xA0",P="\\uD800-\\uDBFF",F="\\uDC00-\\uDFFF",q="\\u0300-\\u036F\\u1AB0-\\u1AFF\\u1DC0-\\u1DFF\\u20D0-\\u20FF\\uFE20-\\uFE2F",W="\\0-\\u02FF\\u0370-\\u1AAF\\u1B00-\\u1DBF\\u1E00-\\u20CF\\u2100-\\uD7FF\\uE000-\\uFE1F\\uFE30-\\uFFFF",ee=new RegExp("(["+W+"]|["+P+"]["+F+"]|["+P+"](?!["+F+"])|(?:[^"+P+"]|^)["+F+"])(["+q+"]+)","g"),te=new RegExp("(["+P+"])(["+F+"])","g"),le=new RegExp("((?:["+W+"]|["+P+"]["+F+"]|["+P+"](?!["+F+"])|(?:[^"+P+"]|^)["+F+"])(?:["+q+"]+))|(["+P+"]["+F+"])|([\\n\\r\\u2028\\u2029])|(.)","g"),he=new RegExp("["+j+"]"),ye=new RegExp("^["+j+"]+"),ke=new RegExp("["+j+"]+$"),me=new RegExp("^"+A+"+$"),Ae=/[-[\]{}()*+!<=:?./\\^$|#,]/g,He=/[^A-Za-z0-9]/g,Le=/[<>&"'`]/g,Pe=/(%{1,2})(?:(\d+)\$)?(\+)?([ 0]|'.{1})?(-)?(\d+)?(?:\.(\d+))?([bcdiouxXeEfgGs])?/g,re=/\.?0+$/g,oe=/<([A-Za-z0-9]+)>/g,Ke="\\u2000-\\u206F",Pt="\\x00-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7b-\\xBF\\xD7\\xF7",Ce="\\u2700-\\u27BF",De="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",Ne="\\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",Ge=new RegExp("(?:["+Ne+"]["+q+"]*)?(?:["+De+"]["+q+"]*)+|(?:["+Ne+"]["+q+"]*)+(?!["+De+"])|["+A+"]+|["+Ce+"]|[^"+Pt+Ke+j+"]+","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,St=new RegExp("^(?:["+De+Ne+"]["+q+"]*)+$"),Et=new RegExp("^((?:["+De+Ne+"]["+q+"]*)|["+A+"])+$"),je=/^[\x01-\xFF]*$/;function Fe(M,U){return M==null?U:M}function at(M){if(E(M))return null;if(k(M))return M;return String(M)}function ut(M,U,H){var Q=O(M),ie;if(E(U))ie=je.test(Q)?st:Ge;else if(U instanceof RegExp)ie=U;else{var be=at(Fe(H,""));ie=new RegExp(at(U),be)}return Fe(Q.match(ie),[])}function Bt(M,U){return U===0?I(M):R(M,!0)}function ct(M){var U=O(M);if(U==="")return"";return ut(U).map(Bt).join("")}function Ue(M){var U=O(M);if(U==="")return"";return U.substr(0,1).toLowerCase()+U.substr(1)}function et(M){var U=O(M);if(U==="")return"";return ut(U).map(I).join("-")}function Rt(M){var U=O(M);if(U==="")return"";return ut(U).map(I).join("_")}function ao(M){var U=O(M);return U.toUpperCase()}function rr(M){var U=O(M);return U.split("").reduce($e,"")}function $e(M,U){var H=U.toLowerCase(),Q=U.toUpperCase();return M+(U===H?Q:H)}function Kt(M,U){var H=O(M),Q=Array.isArray(U)?U:[],ie=je.test(H)?st:Ge;return H.replace(ie,function(be,Be){var Tt=Be>0&&Q.indexOf(H[Be-1])>=0;return Tt?be.toLowerCase():R(be,!0)})}function ve(M,U,H){if(M<=U)return U;if(M>=H)return H;return M}var Se=9007199254740991;function We(M){if(M===1/0)return Se;if(M===-1/0)return-Se;return~~M}function ir(M,U,H){var Q=O(M),ie=E(U)?Q.length:ve(We(U),0,Se),be=O(H,"...");if(ie>=Q.length)return Q;return Q.substr(0,U-be.length)+be}function bt(M,U){var H=O(M);return H.charAt(U)}var Ir=55296,Hr=56319,sr=56320,fa=57343;function ns(M){return M>=Ir&&M<=Hr}function ar(M){return M>=sr&&M<=fa}function zd(M,U){return(M-Ir)*1024+U-sr+65536}function Wn(M){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(E(M))return U;if(typeof M==="number")return M;return Number(M)}function Tz(M,U){return M!==M?U:M}function kz(M,U){var H=O(M),Q=H.length,ie=Wn(U);if(ie=Tz(ie,0),ie<0||ie>=Q)return;var be=H.charCodeAt(ie),Be;if(ns(be)&&Q>ie+1){if(Be=H.charCodeAt(ie+1),ar(Be))return zd(be,Be)}return be}function V6(M,U){var H=O(M),Q=E(U)?1:ve(We(U),0,Se);if(H.length<=Q)return H;return H.substr(0,Q)}function H6(M,U){var H=O(M),Q=Wn(U),ie,be=0;Q=Tz(Q,0);while((ie=le.exec(H))!==null){if(be===Q)return le.lastIndex=0,ie[0];be++}return""}function G6(M,U){var H=O(M),Q=E(U)?1:ve(We(U),0,Se);if(H.length<=Q)return H;return H.substr(H.length-Q,Q)}function K6(M,U,H){var Q=O(M),ie=E(U)?Q.length:ve(We(U),0,Se),be=O(H,"...");if(ie>=Q.length)return Q;var Be=je.test(Q)?st:Ge,Tt=0;return Q.replace(Be,function(dt,or){var pt=or+dt.length;if(pt<=ie-be.length)Tt=pt}),Q.substr(0,Tt)+be}function W6(M,U,H){return O(M).slice(U,H)}function J6(M,U,H){return O(M).substr(U,H)}function Z6(M,U,H){return O(M).substring(U,H)}function Y6(M){return O(M).length}function X6(M){return O(M).replace(ee,"*").replace(te,"*").length}function Q6(M,U){var H=O(M),Q=O(U),ie=Q.length,be=0,Be=0;if(H===""||Q==="")return be;do if(Be=H.indexOf(Q,Be),Be!==-1)be++,Be+=ie;while(Be!==-1);return be}var e8=Array.prototype.reduce;function t8(M,U,H){var Q=O(M);if(Q===""||typeof U!=="function")return 0;var ie=U.bind(H);return e8.call(Q,function(be,Be,Tt){return ie(Be,Tt,Q)?be+1:be},0)}function r8(M,U,H){return ut(M,U,H).length}function Cd(){this.index=0}Cd.prototype.increment=function(){this.index++},Cd.prototype.incrementOnEmptyPosition=function(M){if(E(M))this.increment()},Cd.prototype.getIndexByPosition=function(M){return E(M)?this.index:M-1};var o8="i",Oz="b",Iz="c",n8="d",Rz="o",i8="u",Az="x",Pz="X",Dz="e",Bz="E",Lz="f",Nz="g",Jm="G",s8="s",a8="'",jz="+",c8="-",l8="%%",u8=2,d8=8,Mz=16;function qz(M,U){var H=O(M),Q=E(U)?1:ve(We(U),0,Se),ie="";while(Q){if(Q&1)ie+=H;if(Q>1)H+=H;Q>>=1}return ie}function wd(M,U){var H=We(U/M.length),Q=U%M.length;return qz(M,H+Q).substr(0,U)}function Fz(M,U,H){var Q=O(M),ie=E(U)?0:ve(We(U),0,Se),be=O(H," ");if(ie<=Q.length)return Q;return wd(be,ie-Q.length)+Q}function Uz(M,U,H){var Q=O(M),ie=E(U)?0:ve(We(U),0,Se),be=O(H," ");if(ie<=Q.length)return Q;return Q+wd(be,ie-Q.length)}function p8(M,U){var H=U.width;if(E(H)||M.length>=H)return M;var Q=U.alignmentSpecifier===c8?Uz:Fz;return Q(M,H,U.getPaddingCharacter())}function $z(M,U,H){if(H.signSpecifier===jz&&M>=0)U=jz+U;return U}function f8(M,U){var H=parseFloat(M),Q;if(isNaN(H))H=0;var ie=Wn(U.precision,6);switch(U.typeSpecifier){case Lz:Q=H.toFixed(ie);break;case Dz:Q=H.toExponential(ie);break;case Bz:Q=H.toExponential(ie).toUpperCase();break;case Nz:case Jm:Q=h8(H,ie,U);break}return Q=$z(H,Q,U),O(Q)}function h8(M,U,H){if(M===0)return"0";var Q=U===0?1:U,ie=M.toPrecision(Q).replace(re,"");if(H.typeSpecifier===Jm)ie=ie.toUpperCase();return ie}function m8(M,U){var H=parseInt(M);if(isNaN(H))H=0;switch(H=H>>>0,U.typeSpecifier){case Iz:H=String.fromCharCode(H);break;case Oz:H=H.toString(u8);break;case Rz:H=H.toString(d8);break;case Az:H=H.toString(Mz);break;case Pz:H=H.toString(Mz).toUpperCase();break}return O(H)}function g8(M,U){var H=parseInt(M);if(isNaN(H))H=0;return $z(H,at(H),U)}function y8(M,U){var H=M,Q=U.precision;if(!E(Q)&&H.length>Q)H=ir(H,Q,"");return H}function b8(M,U){var H;switch(U.typeSpecifier){case s8:H=y8;break;case n8:case o8:H=g8;break;case Iz:case Oz:case Rz:case Az:case Pz:case i8:H=m8;break;case Lz:case Dz:case Bz:case Nz:case Jm:H=f8;break}var Q=H(M,U);return p8(Q,U)}function Zm(M){this.percent=M.percent,this.signSpecifier=M.signSpecifier,this.paddingSpecifier=M.paddingSpecifier,this.alignmentSpecifier=M.alignmentSpecifier,this.width=M.width,this.precision=M.precision,this.typeSpecifier=M.typeSpecifier}Zm.prototype.isPercentLiteral=function(){return l8===this.percent},Zm.prototype.getPaddingCharacter=function(){var M=Fe(this.paddingSpecifier," ");if(M.length===2&&M[0]===a8)M=M[1];return M};function v8(M,U,H){if(E(H.typeSpecifier))throw Error("sprintf(): Unknown type specifier");if(M>U-1)throw Error("sprintf(): Too few arguments");if(M<0)throw Error("sprintf(): Argument number must be greater than zero")}function x8(M,U,H,Q,ie,be,Be,Tt,dt,or,pt){var Dt=new Zm({percent:Q,signSpecifier:be,paddingSpecifier:Be,alignmentSpecifier:Tt,width:Wn(dt,null),precision:Wn(or,null),typeSpecifier:pt});if(Dt.isPercentLiteral())return H.slice(1);var jt=M.getIndexByPosition(ie);return M.incrementOnEmptyPosition(ie),v8(jt,U.length,Dt),b8(U[jt],Dt)}function Vz(M){var U=O(M);if(U==="")return U;for(var H=arguments.length,Q=Array(H>1?H-1:0),ie=1;ie<H;ie++)Q[ie-1]=arguments[ie];var be=x8.bind(void 0,new Cd,Q);return U.replace(Pe,be)}function _8(M,U){return Vz.apply(void 0,[M].concat(h(Fe(U,[]))))}var z8={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};function C8(M){return z8[M]}function w8(M){return O(M).replace(Le,C8)}function S8(M){return O(M).replace(Ae,"\\$&")}var Hz={"<":/(&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},E8=Object.keys(Hz);function T8(M,U){return M.replace(Hz[U],U)}function k8(M){var U=O(M);return E8.reduce(T8,U)}function O8(M,U,H){var Q=O(M);return Q.indexOf(U,H)}function I8(M,U,H){var Q=O(M);return Q.lastIndexOf(U,H)}function R8(M,U,H){var Q=O(M),ie=E(H)?0:ve(We(H),0,Q.length),be=Q.substr(ie).search(U);if(be!==-1&&!isNaN(ie))be+=ie;return be}function A8(M,U,H){var Q=O(M),ie=O(U),be=Wn(H);if(be<0||be>Q.length||ie==="")return Q;return Q.slice(0,be)+ie+Q.slice(be)}var Gz={"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:"ї"},$c=null;function P8(){if($c!==null)return $c;return $c={},Object.keys(Gz).forEach(function(M){var U=Gz[M];for(var H=0;H<U.length;H++){var Q=U[H];$c[Q]=M}}),$c}function D8(M){var U=P8()[M];return U?U:M}function B8(M,U){return U}function Kz(M){var U=O(M);if(U==="")return"";return U.replace(He,D8).replace(ee,B8)}function L8(M,U,H){var Q=O(M),ie=E(U)?0:ve(We(U),0,Se),be=O(H," ");if(ie<=Q.length)return Q;var Be=ie-Q.length,Tt=We(Be/2),dt=Be%2;return wd(be,Tt)+Q+wd(be,Tt+dt)}function N8(M,U,H){var Q=O(M);return Q.replace(U,H)}function Wz(M,U,H){var Q=O(M);if(U instanceof RegExp){if(U.flags.indexOf("g")===-1)throw TypeError("search argument is a non-global regular expression");return Q.replace(U,H)}var ie=O(U),be=typeof H==="function";if(!be)H=O(H);var Be=ie.length;if(Be===0)return Wz(M,/(?:)/g,H);var Tt=Be>1?Be:1,dt=[],or=Q.indexOf(ie,0);while(or!==-1)dt.push(or),or=Q.indexOf(ie,or+Tt);var pt=0,Dt="";for(var jt=0;jt<dt.length;jt++){var Yr=dt[jt],co=H;if(be)co=O(H.call(void 0,ie,Yr,Q));Dt+=Q.slice(pt,Yr)+co,pt=Yr+Be}if(pt<Q.length)Dt+=Q.slice(pt);return Dt}function j8(M){var U=O(M);return U.split("").reverse().join("")}function Jz(M){var U=O(M);U=U.replace(ee,function(ie,be,Be){return Jz(Be)+be}).replace(te,"$2$1");var H="",Q=U.length;while(Q--)H+=U.charAt(Q);return H}function M8(M){var U=O(M);if(U==="")return"";var H=Kz(U).replace(He,"-");return et(H)}function q8(M,U,H,Q){var ie=O(M),be=O(Q),Be=Wn(U);if(Be<0){if(Be=ie.length+Be,Be<0)Be=0}else if(Be>ie.length)Be=ie.length;var Tt=Wn(H,ie.length-Be);if(Tt<0)Tt=0;return ie.slice(0,Be)+be+ie.slice(Be+Tt)}function F8(M,U,H){var Q=O(M),ie,be;if(k(U)&&k(H))ie=U.split(""),be=H.split("");else{var Be=U8(Fe(U,{})),Tt=f(Be,2);ie=Tt[0],be=Tt[1]}var dt=ie.length;if(dt===0)return Q;var or="",pt=be.length;for(var Dt=0;Dt<Q.length;Dt++){var jt=!1,Yr=void 0;for(var co=0;co<dt&&co<pt;co++){var lo=ie[co];if(Q.substr(Dt,lo.length)===lo){jt=!0,Yr=be[co],Dt=Dt+lo.length-1;break}}or+=jt?Yr:Q[Dt]}return or}function U8(M){var U=Object.keys(M),H=U.sort($8).map(function(Q){return M[Q]});return[U,H]}function $8(M,U){if(M.length===U.length)return 0;return M.length<U.length?1:-1}function Ym(M,U,H){var Q=O(M),ie=at(U);if(ie===null)return!1;if(ie==="")return!0;return H=E(H)?0:ve(We(H),0,Q.length),Q.indexOf(ie,H)!==-1}var V8=Array.prototype.reduce;function Zz(M,U){var H=O(M);if(U===""||H==="")return H;var Q=at(U);if(E(Q))return H.replace(ye,"");var ie=!0;return V8.call(H,function(be,Be){if(ie&&Ym(Q,Be))return be;return ie=!1,be+Be},"")}var H8=Array.prototype.reduceRight;function Yz(M,U){var H=O(M);if(U===""||H==="")return H;var Q=at(U);if(E(Q))return H.replace(ke,"");var ie=!0;return H8.call(H,function(be,Be){if(ie&&Ym(Q,Be))return be;return ie=!1,Be+be},"")}function G8(M,U){var H=O(M);if(U===""||H==="")return H;var Q=at(U);if(E(Q))return H.trim();return Yz(Zz(H,Q),Q)}var K8="width",W8="newLine",J8="indent",Z8="cut";function Y8(M){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=O(M),Q=X8(U),{width:ie,newLine:be,indent:Be,cut:Tt}=Q;if(H===""||ie<=0)return Be;var dt=H.length,or=H.substring.bind(H),pt=0,Dt="";while(dt-pt>ie){if(H[pt]===" "){pt++;continue}var jt=H.lastIndexOf(" ",ie+pt);if(jt>=pt)Dt+=Be+or(pt,jt)+be,pt=jt+1;else if(Tt)Dt+=Be+or(pt,ie+pt)+be,pt+=ie;else if(jt=H.indexOf(" ",ie+pt),jt>=0)Dt+=Be+or(pt,jt)+be,pt=jt+1;else Dt+=Be+or(pt),pt=dt}if(pt<dt)Dt+=Be+or(pt);return Dt}function X8(M){return{width:Wn(M[K8],75),newLine:O(M[W8],`
64
+ `),indent:O(M[J8],""),cut:T(M[Z8],!1)}}function Q8(M,U,H){if(E(U))return!1;var Q=O(M),ie=O(U);if(ie==="")return!0;H=E(H)?Q.length:ve(We(H),0,Q.length),H-=ie.length;var be=Q.indexOf(ie,H);return be!==-1&&be===H}function Xm(M){var U=O(M);return St.test(U)}function e$(M){var U=O(M);return Et.test(U)}function t$(M){var U=O(M);return U.trim().length===0}function r$(M){var U=O(M);return me.test(U)}function o$(M){var U=O(M);return U.length===0}function n$(M){var U=O(M);return Xm(U)&&U.toLowerCase()===U}function i$(M){var U=typeof M==="object"&&!E(M)?Number(M):M;return(typeof U==="number"||typeof U==="string")&&!isNaN(U-parseFloat(U))}function s$(M){var U=O(M);return Xm(U)&&U.toUpperCase()===U}function a$(M,U,H){var Q=O(M),ie=O(H),be;if(!(U instanceof RegExp)){if(be=at(U),be===null)return!1;U=new RegExp(be,ie)}return U.test(Q)}function c$(M,U,H){var Q=O(M),ie=at(U);if(ie===null)return!1;if(ie==="")return!0;return H=E(H)?0:ve(We(H),0,Q.length),Q.substr(H,ie.length)===ie}function l$(M){var U=O(M);return U.split("")}function u$(M){var U=O(M),H=U.length,Q=[],ie=0,be;while(ie<H)be=kz(U,ie),Q.push(be),ie+=be>65535?2:1;return Q}function d$(M){var U=O(M);return Fe(U.match(le),[])}function p$(M,U,H){var Q=O(M);return Q.split(U,H)}var f$="\uFEFF";function h$(M){var U=O(M);if(U==="")return"";if(U[0]===f$)return U.substring(1);return U}function m$(M,U,H){var Q=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,ie=0;if(Q)ie=-U.length+1;var be=M.substr(H+ie,U.length);return be.toLowerCase()===U}function g$(M){var U=[],H;while((H=oe.exec(M))!==null)U.push(H[1]);return U}var Xz=0,Qz=1,Qm=2;function y$(M){var U=Xz,H="",Q=0;while(U!==Qm){var ie=M[Q++].toLowerCase();switch(ie){case"<":break;case">":U=Qm;break;default:if(he.test(ie)){if(U===Qz)U=Qm}else{if(U===Xz)U=Qz;if(ie!=="/")H+=ie}break}}return H}var Vc=0,is=1,Sd=2,e1=3;function b$(M,U,H){if(M=O(M),M==="")return"";if(!Array.isArray(U)){var Q=O(U);U=Q===""?[]:g$(Q)}var ie=O(H),be=M.length,Be=U.length>0,Tt=m$.bind(null,M),dt=Vc,or=0,pt="",Dt="",jt=null;for(var Yr=0;Yr<be;Yr++){var co=M[Yr],lo=!1;switch(co){case"<":if(jt)break;if(Tt("< ",Yr,!1)){lo=!0;break}if(dt===Vc){lo=!0,dt=is;break}if(dt===is){or++;break}lo=!0;break;case"!":if(dt===is&&Tt("<!",Yr)){dt=Sd;break}lo=!0;break;case"-":if(dt===Sd&&Tt("!--",Yr)){dt=e1;break}lo=!0;break;case'"':case"'":if(dt===is){if(jt===co)jt=null;else if(!jt)jt=co}lo=!0;break;case"E":case"e":if(dt===Sd&&Tt("doctype",Yr)){dt=is;break}lo=!0;break;case">":if(or>0){or--;break}if(jt)break;if(dt===is){if(jt=null,dt=Vc,Be){Dt+=">";var S$=y$(Dt);if(U.indexOf(S$.toLowerCase())!==-1)pt+=Dt;else pt+=ie;Dt=""}else pt+=ie;break}if(dt===Sd||dt===e1&&Tt("-->",Yr)){jt=null,dt=Vc,Dt="";break}lo=!0;break;default:lo=!0}if(lo)switch(dt){case Vc:pt+=co;break;case is:if(Be)Dt+=co;break}}return pt}var ha=null;function v$(){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 eg=v$(),x$=eg.v;function _$(){if(this===eg.v)eg.v=x$;return this}var z$="1.4.0",tg={camelCase:ct,capitalize:R,decapitalize:Ue,kebabCase:et,lowerCase:I,snakeCase:Rt,swapCase:rr,titleCase:Kt,upperCase:ao,count:Y6,countGraphemes:X6,countSubstrings:Q6,countWhere:t8,countWords:r8,escapeHtml:w8,escapeRegExp:S8,unescapeHtml:k8,sprintf:Vz,vprintf:_8,indexOf:O8,lastIndexOf:I8,search:R8,charAt:bt,codePointAt:kz,first:V6,graphemeAt:H6,last:G6,prune:K6,slice:W6,substr:J6,substring:Z6,truncate:ir,insert:A8,latinise:Kz,pad:L8,padLeft:Fz,padRight:Uz,repeat:qz,replace:N8,replaceAll:Wz,reverse:j8,reverseGrapheme:Jz,slugify:M8,splice:q8,tr:F8,trim:G8,trimLeft:Zz,trimRight:Yz,wordWrap:Y8,endsWith:Q8,includes:Ym,isAlpha:Xm,isAlphaDigit:e$,isBlank:t$,isDigit:r$,isEmpty:o$,isLowerCase:n$,isNumeric:i$,isString:k,isUpperCase:s$,matches:a$,startsWith:c$,chars:l$,codePoints:u$,graphemes:d$,split:p$,words:ut,stripBom:h$,stripTags:b$,noConflict:_$,version:z$};function wo(M,U){this._wrappedValue=M,this._explicitChain=U}wo.prototype.value=function(){return this._wrappedValue},wo.prototype.valueOf=function(){return this.value()},wo.prototype.toJSON=function(){return this.value()},wo.prototype.toString=function(){return String(this.value())},wo.prototype.chain=function(){return new wo(this._wrappedValue,!0)},wo.prototype.thru=function(M){if(typeof M==="function")return new wo(M(this._wrappedValue),this._explicitChain);return this},wo.prototype._explicitChain=!0;function C$(M){return function(){for(var U=arguments.length,H=Array(U),Q=0;Q<U;Q++)H[Q]=arguments[Q];var ie=M.apply(void 0,[this._wrappedValue].concat(H));if(this._explicitChain||typeof ie==="string")return new wo(ie,this._explicitChain);else return ie}}Object.keys(tg).forEach(function(M){wo.prototype[M]=C$(tg[M])});function w$(M){return new wo(M,!0)}function t1(M){return new wo(M,!1)}return o(t1,tg,{chain:w$}),t1})});var DT=i(function(fo){var lY=fo&&fo.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(fo,"__esModule",{value:!0});fo.webEOL=fo.unixEOL=void 0;fo.upperCaseSnakeCase=uY;fo.camelCase=dY;fo.titleFormat=pY;fo.pascalCase=fY;fo.kebabCase=hY;fo.formatJson=mY;var Ci=lY(PT());fo.unixEOL=`
65
+ `;fo.webEOL=`\r
66
+ `;function uY(o){return Ci.default.upperCase(Ci.default.snakeCase(o))}function dY(o){return Ci.default.camelCase(o)}function pY(o){return Ci.default.titleCase(Ci.default.words(o).join(" "))}function fY(o){return Ci.default.words(o).map((f)=>Ci.default.capitalize(f)).join("")}function hY(o){return Ci.default.kebabCase(o)}function mY(o){return JSON.stringify(o,null,2)+`
67
+ `}});var LT=i(function(BT){Object.defineProperty(BT,"__esModule",{value:!0});BT.caps=gY;function gY(o){return o?o.toUpperCase():"V2"}});var MT=i(function(NT){Object.defineProperty(NT,"__esModule",{value:!0});NT.UniqueNameGenerator=void 0;class Yn{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 z=this.getUniqueIndex(o,y,f,h);return this.generateNamesWithIndexAndSuffixes(o,z,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)=>Yn.getNameForComparison(f,o))}areNamesUsed(o,f,h){return o.some((y)=>f.map((x)=>Yn.getNameForComparison(x,h)).includes(Yn.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(Yn.getNameForComparison(h,f)))}getUniqueIndex(o,f,h,y){let x=1;while(x<Yn.MAXIMUM_NUMBER_OF_SUFFIX){let z=this.generateNamesWithIndexAndSuffixes(o,x,h);if(!this.areNamesUsed(z,f,y))return x;x++}throw Error(`Unable to find a unique name for ${o} within the range of ${Yn.MAXIMUM_NUMBER_OF_SUFFIX} suffixes.`)}getNameWithoutIndex(o){return o.replace(new RegExp(`${this.indexSeparator}\\d+$`),"")}}NT.UniqueNameGenerator=Yn;Yn.MAXIMUM_NUMBER_OF_SUFFIX=1000});var UT=i(function(nAe,FT){var qT=c("stream").Stream,bY=c("util");FT.exports=nn;function nn(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}bY.inherits(nn,qT);nn.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(nn.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});nn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};nn.prototype.resume=function(){if(!this._released)this.release();this.source.resume()};nn.prototype.pause=function(){this.source.pause()};nn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(o){this.emit.apply(this,o)}.bind(this)),this._bufferedEvents=[]};nn.prototype.pipe=function(){var o=qT.prototype.pipe.apply(this,arguments);return this.resume(),o};nn.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)};nn.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 GT=i(function(iAe,HT){var vY=c("util"),VT=c("stream").Stream,$T=UT();HT.exports=er;function er(){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}vY.inherits(er,VT);er.create=function(o){var f=new this;o=o||{};for(var h in o)f[h]=o[h];return f};er.isStreamLike=function(o){return typeof o!=="function"&&typeof o!=="string"&&typeof o!=="boolean"&&typeof o!=="number"&&!Buffer.isBuffer(o)};er.prototype.append=function(o){var f=er.isStreamLike(o);if(f){if(!(o instanceof $T)){var h=$T.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};er.prototype.pipe=function(o,f){return VT.prototype.pipe.call(this,o,f),this.resume(),o};er.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}};er.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=er.isStreamLike(h);if(y)h.on("data",this._checkDataSize.bind(this)),this._handleErrors(h);this._pipeNext(h)}.bind(this))};er.prototype._pipeNext=function(o){this._currentStream=o;var f=er.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()};er.prototype._handleErrors=function(o){var f=this;o.on("error",function(h){f._emitError(h)})};er.prototype.write=function(o){this.emit("data",o)};er.prototype.pause=function(){if(!this.pauseStreams)return;if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};er.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")};er.prototype.end=function(){this._reset(),this.emit("end")};er.prototype.destroy=function(){this._reset(),this.emit("close")};er.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};er.prototype._checkDataSize=function(){if(this._updateDataSize(),this.dataSize<=this.maxDataSize)return;var o="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(Error(o))};er.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};er.prototype._emitError=function(o){this._reset(),this.emit("error",o)}});var KT=i(function(sAe,xY){xY.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 QT=i(function(TY){/*!
68
+ * mime-types
69
+ * Copyright(c) 2014 Jonathan Ong
70
+ * Copyright(c) 2015 Douglas Christopher Wilson
71
+ * MIT Licensed
72
+ */var dp=KT(),_Y=c("path").extname,WT=/^\s*([^;\s]*)(?:;|\s|$)/,zY=/^text\//i;TY.charset=JT;TY.charsets={lookup:JT};TY.contentType=CY;TY.extension=wY;TY.extensions=Object.create(null);TY.lookup=SY;TY.types=Object.create(null);EY(TY.extensions,TY.types);function JT(o){if(!o||typeof o!=="string")return!1;var f=WT.exec(o),h=f&&dp[f[1].toLowerCase()];if(h&&h.charset)return h.charset;if(f&&zY.test(f[1]))return"UTF-8";return!1}function CY(o){if(!o||typeof o!=="string")return!1;var f=o.indexOf("/")===-1?TY.lookup(o):o;if(!f)return!1;if(f.indexOf("charset")===-1){var h=TY.charset(f);if(h)f+="; charset="+h.toLowerCase()}return f}function wY(o){if(!o||typeof o!=="string")return!1;var f=WT.exec(o),h=f&&TY.extensions[f[1].toLowerCase()];if(!h||!h.length)return!1;return h[0]}function SY(o){if(!o||typeof o!=="string")return!1;var f=_Y("x."+o).toLowerCase().substr(1);if(!f)return!1;return TY.types[f]||!1}function EY(o,f){var h=["nginx","apache",void 0,"iana"];Object.keys(dp).forEach(function(x){var z=dp[x],C=z.extensions;if(!C||!C.length)return;o[x]=C;for(var w=0;w<C.length;w++){var S=C[w];if(f[S]){var E=h.indexOf(dp[f[S]].source),T=h.indexOf(z.source);if(f[S]!=="application/octet-stream"&&(E>T||E===T&&f[S].substr(0,12)==="application/"))continue}f[S]=x}})}});var tk=i(function(cAe,ek){ek.exports=RY;function RY(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 ny=i(function(lAe,ok){var rk=tk();ok.exports=AY;function AY(o){var f=!1;return rk(function(){f=!0}),function(y,x){if(f)o(y,x);else rk(function(){o(y,x)})}}});var iy=i(function(uAe,nk){nk.exports=PY;function PY(o){Object.keys(o.jobs).forEach(DY.bind(o)),o.jobs={}}function DY(o){if(typeof this.jobs[o]=="function")this.jobs[o]()}});var sy=i(function(dAe,sk){var ik=ny(),BY=iy();sk.exports=LY;function LY(o,f,h,y){var x=h.keyedList?h.keyedList[h.index]:h.index;h.jobs[x]=NY(f,x,o[x],function(z,C){if(!(x in h.jobs))return;if(delete h.jobs[x],z)BY(h);else h.results[x]=C;y(z,h.results)})}function NY(o,f,h,y){var x;if(o.length==2)x=o(h,ik(y));else x=o(h,f,ik(y));return x}});var ay=i(function(pAe,ak){ak.exports=jY;function jY(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,z){return f(o[x],o[z])});return y}});var cy=i(function(fAe,ck){var MY=iy(),qY=ny();ck.exports=FY;function FY(o){if(!Object.keys(this.jobs).length)return;this.index=this.size,MY(this),qY(o)(null,this.results)}});var uk=i(function(hAe,lk){var UY=sy(),$Y=ay(),VY=cy();lk.exports=HY;function HY(o,f,h){var y=$Y(o);while(y.index<(y.keyedList||o).length)UY(o,f,y,function(x,z){if(x){h(x,z);return}if(Object.keys(y.jobs).length===0){h(null,y.results);return}}),y.index++;return VY.bind(y,h)}});var ly=i(function(mAe,pp){var dk=sy(),GY=ay(),KY=cy();pp.exports=WY;pp.exports.ascending=pk;pp.exports.descending=JY;function WY(o,f,h,y){var x=GY(o,h);return dk(o,f,x,function z(C,w){if(C){y(C,w);return}if(x.index++,x.index<(x.keyedList||o).length){dk(o,f,x,z);return}y(null,x.results)}),KY.bind(x,y)}function pk(o,f){return o<f?-1:o>f?1:0}function JY(o,f){return-1*pk(o,f)}});var hk=i(function(gAe,fk){var ZY=ly();fk.exports=YY;function YY(o,f,h){return ZY(o,f,null,h)}});var gk=i(function(yAe,mk){mk.exports={parallel:uk(),serial:hk(),serialOrdered:ly()}});var uy=i(function(bAe,yk){yk.exports=Object});var vk=i(function(vAe,bk){bk.exports=Error});var _k=i(function(xAe,xk){xk.exports=EvalError});var Ck=i(function(_Ae,zk){zk.exports=RangeError});var Sk=i(function(zAe,wk){wk.exports=ReferenceError});var Tk=i(function(CAe,Ek){Ek.exports=SyntaxError});var fp=i(function(wAe,kk){kk.exports=TypeError});var Ik=i(function(SAe,Ok){Ok.exports=URIError});var Ak=i(function(EAe,Rk){Rk.exports=Math.abs});var Dk=i(function(TAe,Pk){Pk.exports=Math.floor});var Lk=i(function(kAe,Bk){Bk.exports=Math.max});var jk=i(function(OAe,Nk){Nk.exports=Math.min});var qk=i(function(IAe,Mk){Mk.exports=Math.pow});var Uk=i(function(RAe,Fk){Fk.exports=Math.round});var Vk=i(function(AAe,$k){$k.exports=Number.isNaN||function(f){return f!==f}});var Gk=i(function(PAe,Hk){var XY=Vk();Hk.exports=function(f){if(XY(f)||f===0)return f;return f<0?-1:1}});var Wk=i(function(DAe,Kk){Kk.exports=Object.getOwnPropertyDescriptor});var dy=i(function(BAe,Jk){var hp=Wk();if(hp)try{hp([],"length")}catch(o){hp=null}Jk.exports=hp});var Yk=i(function(LAe,Zk){var mp=Object.defineProperty||!1;if(mp)try{mp({},"a",{value:1})}catch(o){mp=!1}Zk.exports=mp});var py=i(function(NAe,Xk){Xk.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 z 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 C=Object.getOwnPropertySymbols(f);if(C.length!==1||C[0]!==h)return!1;if(!Object.prototype.propertyIsEnumerable.call(f,h))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var w=Object.getOwnPropertyDescriptor(f,h);if(w.value!==x||w.enumerable!==!0)return!1}return!0}});var tO=i(function(jAe,eO){var Qk=typeof Symbol<"u"&&Symbol,QY=py();eO.exports=function(){if(typeof Qk!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof Qk("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return QY()}});var fy=i(function(MAe,rO){rO.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var hy=i(function(qAe,oO){var eX=uy();oO.exports=eX.getPrototypeOf||null});var sO=i(function(FAe,iO){var tX="Function.prototype.bind called on incompatible ",rX=Object.prototype.toString,oX=Math.max,nX="[object Function]",nO=function(f,h){var y=[];for(var x=0;x<f.length;x+=1)y[x]=f[x];for(var z=0;z<h.length;z+=1)y[z+f.length]=h[z];return y},iX=function(f,h){var y=[];for(var x=h||0,z=0;x<f.length;x+=1,z+=1)y[z]=f[x];return y},sX=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};iO.exports=function(f){var h=this;if(typeof h!=="function"||rX.apply(h)!==nX)throw TypeError(tX+h);var y=iX(arguments,1),x,z=function(){if(this instanceof x){var T=h.apply(this,nO(y,arguments));if(Object(T)===T)return T;return this}return h.apply(f,nO(y,arguments))},C=oX(0,h.length-y.length),w=[];for(var S=0;S<C;S++)w[S]="$"+S;if(x=Function("binder","return function ("+sX(w,",")+"){ return binder.apply(this,arguments); }")(z),h.prototype){var E=function(){};E.prototype=h.prototype,x.prototype=new E,E.prototype=null}return x}});var gl=i(function(UAe,aO){var aX=sO();aO.exports=Function.prototype.bind||aX});var gp=i(function($Ae,cO){cO.exports=Function.prototype.call});var my=i(function(VAe,lO){lO.exports=Function.prototype.apply});var dO=i(function(HAe,uO){uO.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var fO=i(function(GAe,pO){var cX=gl(),lX=my(),uX=gp(),dX=dO();pO.exports=dX||cX.call(uX,lX)});var mO=i(function(KAe,hO){var pX=gl(),fX=fp(),hX=gp(),mX=fO();hO.exports=function(f){if(f.length<1||typeof f[0]!=="function")throw new fX("a function is required");return mX(pX,hX,f)}});var _O=i(function(WAe,xO){var gX=mO(),gO=dy(),bO;try{bO=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!=="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var gy=!!bO&&gO&&gO(Object.prototype,"__proto__"),vO=Object,yO=vO.getPrototypeOf;xO.exports=gy&&typeof gy.get==="function"?gX([gy.get]):typeof yO==="function"?function(f){return yO(f==null?f:vO(f))}:!1});var EO=i(function(JAe,SO){var zO=fy(),CO=hy(),wO=_O();SO.exports=zO?function(f){return zO(f)}:CO?function(f){if(!f||typeof f!=="object"&&typeof f!=="function")throw TypeError("getProto: not an object");return CO(f)}:wO?function(f){return wO(f)}:null});var yp=i(function(ZAe,TO){var yX=Function.prototype.call,bX=Object.prototype.hasOwnProperty,vX=gl();TO.exports=vX.call(yX,bX)});var PO=i(function(YAe,AO){var rt,xX=uy(),_X=vk(),zX=_k(),CX=Ck(),wX=Sk(),Pa=Tk(),Aa=fp(),SX=Ik(),EX=Ak(),TX=Dk(),kX=Lk(),OX=jk(),IX=qk(),RX=Uk(),AX=Gk(),IO=Function,yy=function(o){try{return IO('"use strict"; return ('+o+").constructor;")()}catch(f){}},yl=dy(),PX=Yk(),by=function(){throw new Aa},DX=yl?function(){try{return arguments.callee,by}catch(o){try{return yl(arguments,"callee").get}catch(f){return by}}}():by,Ia=tO()(),Cr=EO(),BX=hy(),LX=fy(),RO=my(),bl=gp(),Ra={},NX=typeof Uint8Array>"u"||!Cr?rt:Cr(Uint8Array),gs={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?rt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?rt:ArrayBuffer,"%ArrayIteratorPrototype%":Ia&&Cr?Cr([][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%":_X,"%eval%":eval,"%EvalError%":zX,"%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%":IO,"%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&&Cr?Cr(Cr([][Symbol.iterator]())):rt,"%JSON%":typeof JSON==="object"?JSON:rt,"%Map%":typeof Map>"u"?rt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ia||!Cr?rt:Cr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":xX,"%Object.getOwnPropertyDescriptor%":yl,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?rt:Promise,"%Proxy%":typeof Proxy>"u"?rt:Proxy,"%RangeError%":CX,"%ReferenceError%":wX,"%Reflect%":typeof Reflect>"u"?rt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?rt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ia||!Cr?rt:Cr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?rt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ia&&Cr?Cr(""[Symbol.iterator]()):rt,"%Symbol%":Ia?Symbol:rt,"%SyntaxError%":Pa,"%ThrowTypeError%":DX,"%TypedArray%":NX,"%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%":SX,"%WeakMap%":typeof WeakMap>"u"?rt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?rt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?rt:WeakSet,"%Function.prototype.call%":bl,"%Function.prototype.apply%":RO,"%Object.defineProperty%":PX,"%Object.getPrototypeOf%":BX,"%Math.abs%":EX,"%Math.floor%":TX,"%Math.max%":kX,"%Math.min%":OX,"%Math.pow%":IX,"%Math.round%":RX,"%Math.sign%":AX,"%Reflect.getPrototypeOf%":LX};if(Cr)try{null.error}catch(o){vy=Cr(Cr(o)),gs["%Error.prototype%"]=vy}var vy,jX=function o(f){var h;if(f==="%AsyncFunction%")h=yy("async function () {}");else if(f==="%GeneratorFunction%")h=yy("function* () {}");else if(f==="%AsyncGeneratorFunction%")h=yy("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&&Cr)h=Cr(x.prototype)}return gs[f]=h,h},kO={__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"]},vl=gl(),bp=yp(),MX=vl.call(bl,Array.prototype.concat),qX=vl.call(RO,Array.prototype.splice),OO=vl.call(bl,String.prototype.replace),vp=vl.call(bl,String.prototype.slice),FX=vl.call(bl,RegExp.prototype.exec),UX=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,$X=/\\(\\)?/g,VX=function(f){var h=vp(f,0,1),y=vp(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 OO(f,UX,function(z,C,w,S){x[x.length]=w?OO(S,$X,"$1"):C||z}),x},HX=function(f,h){var y=f,x;if(bp(kO,y))x=kO[y],y="%"+x[0]+"%";if(bp(gs,y)){var z=gs[y];if(z===Ra)z=jX(y);if(typeof z>"u"&&!h)throw new Aa("intrinsic "+f+" exists, but is not available. Please file an issue!");return{alias:x,name:y,value:z}}throw new Pa("intrinsic "+f+" does not exist!")};AO.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(FX(/^%?[^%]*%?$/,f)===null)throw new Pa("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var y=VX(f),x=y.length>0?y[0]:"",z=HX("%"+x+"%",h),{name:C,value:w}=z,S=!1,E=z.alias;if(E)x=E[0],qX(y,MX([0,1],E));for(var T=1,k=!0;T<y.length;T+=1){var O=y[T],R=vp(O,0,1),I=vp(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)S=!0;if(x+="."+O,C="%"+x+"%",bp(gs,C))w=gs[C];else if(w!=null){if(!(O in w)){if(!h)throw new Aa("base intrinsic for "+f+" exists, but the property is not available.");return}if(yl&&T+1>=y.length){var A=yl(w,O);if(k=!!A,k&&"get"in A&&!("originalValue"in A.get))w=A.get;else w=w[O]}else k=bp(w,O),w=w[O];if(k&&!S)gs[C]=w}}return w}});var BO=i(function(XAe,DO){var GX=py();DO.exports=function(){return GX()&&!!Symbol.toStringTag}});var jO=i(function(QAe,NO){var KX=PO(),LO=KX("%Object.defineProperty%",!0),WX=BO()(),JX=yp(),ZX=fp(),xp=WX?Symbol.toStringTag:null;NO.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 ZX("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");if(xp&&(y||!JX(f,xp)))if(LO)LO(f,xp,{configurable:!x,enumerable:!1,value:h,writable:!1});else f[xp]=h}});var qO=i(function(e2e,MO){MO.exports=function(o,f){return Object.keys(f).forEach(function(h){o[h]=o[h]||f[h]}),o}});var $O=i(function(t2e,UO){var Cy=GT(),YX=c("util"),xy=c("path"),XX=c("http"),QX=c("https"),eQ=c("url").parse,tQ=c("fs"),rQ=c("stream").Stream,oQ=c("crypto"),_y=QT(),nQ=gk(),iQ=jO(),wi=yp(),zy=qO();function FO(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=[],Cy.call(this),o=o||{};for(var f in o)this[f]=o[f]}YX.inherits(mt,Cy);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=Cy.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),z=this._multiPartFooter();y(x),y(f),y(z),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 rQ))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 tQ.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="",C={"Content-Disposition":["form-data",'name="'+FO(o)+'"'].concat(y||[]),"Content-Type":[].concat(x||[])};if(typeof h.header==="object")zy(C,h.header);var w;for(var S in C)if(wi(C,S)){if(w=C[S],w==null)continue;if(!Array.isArray(w))w=[w];if(w.length)z+=S+": "+w.join("; ")+mt.LINE_BREAK}return"--"+this.getBoundary()+mt.LINE_BREAK+z+mt.LINE_BREAK};mt.prototype._getContentDisposition=function(o,f){var h;if(typeof f.filepath==="string")h=xy.normalize(f.filepath).replace(/\\/g,"/");else if(f.filename||o&&(o.name||o.path))h=xy.basename(f.filename||o&&(o.name||o.path));else if(o&&o.readable&&wi(o,"httpVersion"))h=xy.basename(o.client._httpMessage.path||"");if(h)return'filename="'+FO(h)+'"'};mt.prototype._getContentType=function(o,f){var h=f.contentType;if(!h&&o&&o.name)h=_y.lookup(o.name);if(!h&&o&&o.path)h=_y.lookup(o.path);if(!h&&o&&o.readable&&wi(o,"httpVersion"))h=o.headers["content-type"];if(!h&&(f.filepath||f.filename))h=_y.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="--------------------------"+oQ.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}nQ.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=eQ(o),y=zy({port:o.port,path:o.pathname,host:o.hostname,protocol:o.protocol},x);else if(y=zy(o,x),!y.port)y.port=y.protocol==="https:"?443:80;if(y.headers=this.getHeaders(o.headers),y.protocol==="https:")h=QX.request(y);else h=XX.request(y);return this.getLength(function(z,C){if(z&&z!=="Unknown stream"){this._error(z);return}if(C)h.setHeader("Content-Length",C);if(this.pipe(h),f){var w,S=function(E,T){return h.removeListener("error",S),h.removeListener("response",w),f.call(this,E,T)};w=S.bind(this,null),h.on("error",S),h.on("response",w)}}.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]"};iQ(mt.prototype,"FormData");UO.exports=mt});var HO=i(function(VO){Object.defineProperty(VO,"__esModule",{value:!0});function sQ(o){return function(f,h){return new Promise((y,x)=>{o.call(this,f,h,(z,C)=>{if(z)x(z);else y(C)})})}}VO.default=sQ});var WO=i(function(Sy,KO){var GO=Sy&&Sy.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},cQ=c("events"),lQ=GO(Ct()),uQ=GO(HO()),xl=lQ.default("agent-base");function dQ(o){return Boolean(o)&&typeof o.addRequest==="function"}function wy(){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 _p(o,f){return new _p.Agent(o,f)}(function(o){class f extends cQ.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 wy()?443:80}set defaultPort(h){this.explicitDefaultPort=h}get protocol(){if(typeof this.explicitProtocol==="string")return this.explicitProtocol;return wy()?"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=wy();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 z=!1,C=null,w=x.timeout||this.timeout,S=(O)=>{if(h._hadError)return;h.emit("error",O),h._hadError=!0},E=()=>{C=null,z=!0;let O=Error(`A "socket" was not created for HTTP request before ${w}ms`);O.code="ETIMEOUT",S(O)},T=(O)=>{if(z)return;if(C!==null)clearTimeout(C),C=null;S(O)},k=(O)=>{if(z)return;if(C!=null)clearTimeout(C),C=null;if(dQ(O)){xl("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}\``);S(R)};if(typeof this.callback!=="function"){S(Error("`callback` is not defined"));return}if(!this.promisifiedCallback)if(this.callback.length>=3)xl("Converting legacy callback function to promise"),this.promisifiedCallback=uQ.default(this.callback);else this.promisifiedCallback=this.callback;if(typeof w==="number"&&w>0)C=setTimeout(E,w);if("port"in x&&typeof x.port!=="number")x.port=Number(x.port);try{xl("Resolving socket for %o request: %o",x.protocol,`${h.method} ${h.path}`),Promise.resolve(this.promisifiedCallback(h,x)).then(k,T)}catch(O){Promise.reject(O).catch(T)}}freeSocket(h,y){xl("Freeing socket %o %o",h.constructor.name,y),h.destroy()}destroy(){xl("Destroying agent %o",this.constructor.name)}}o.Agent=f,o.prototype=o.Agent.prototype})(_p||(_p={}));KO.exports=_p});var JO=i(function(zl){var pQ=zl&&zl.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(zl,"__esModule",{value:!0});var fQ=pQ(Ct()),_l=fQ.default("https-proxy-agent:parse-proxy-response");function hQ(o){return new Promise((f,h)=>{let y=0,x=[];function z(){let k=o.read();if(k)T(k);else o.once("readable",z)}function C(){o.removeListener("end",S),o.removeListener("error",E),o.removeListener("close",w),o.removeListener("readable",z)}function w(k){_l("onclose had error %o",k)}function S(){_l("onend")}function E(k){C(),_l("onerror %o",k),h(k)}function T(k){x.push(k),y+=k.length;let O=Buffer.concat(x,y);if(O.indexOf(`\r
75
+ \r
76
+ `)===-1){_l("have not received end of HTTP headers yet..."),z();return}let I=O.toString("ascii",0,O.indexOf(`\r
77
+ `)),A=+I.split(" ")[1];_l("got proxy server response: %o",I),f({statusCode:A,buffered:O})}o.on("error",E),o.on("close",w),o.on("end",S),z()})}zl.default=hQ});var QO=i(function(ys){var mQ=ys&&ys.__awaiter||function(o,f,h,y){function x(z){return z instanceof h?z:new h(function(C){C(z)})}return new(h||(h=Promise))(function(z,C){function w(T){try{E(y.next(T))}catch(k){C(k)}}function S(T){try{E(y.throw(T))}catch(k){C(k)}}function E(T){T.done?z(T.value):x(T.value).then(w,S)}E((y=y.apply(o,f||[])).next())})},Da=ys&&ys.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(ys,"__esModule",{value:!0});var ZO=Da(c("net")),YO=Da(c("tls")),gQ=Da(c("url")),yQ=Da(c("assert")),bQ=Da(Ct()),vQ=WO(),xQ=Da(JO()),Cl=bQ.default("https-proxy-agent:agent");class XO extends vQ.Agent{constructor(o){let f;if(typeof o==="string")f=gQ.default.parse(o);else f=o;if(!f)throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");Cl("creating new HttpsProxyAgent instance: %o",f);super(f);let h=Object.assign({},f);if(this.secureProxy=f.secureProxy||CQ(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 mQ(this,void 0,void 0,function*(){let{proxy:h,secureProxy:y}=this,x;if(y)Cl("Creating `tls.Socket`: %o",h),x=YO.default.connect(h);else Cl("Creating `net.Socket`: %o",h),x=ZO.default.connect(h);let z=Object.assign({},h.headers),w=`CONNECT ${`${f.host}:${f.port}`} HTTP/1.1\r
78
+ `;if(h.auth)z["Proxy-Authorization"]=`Basic ${Buffer.from(h.auth).toString("base64")}`;let{host:S,port:E,secureEndpoint:T}=f;if(!zQ(E,T))S+=`:${E}`;z.Host=S,z.Connection="close";for(let A of Object.keys(z))w+=`${A}: ${z[A]}\r
79
+ `;let k=xQ.default(x);x.write(`${w}\r
80
+ `);let{statusCode:O,buffered:R}=yield k;if(O===200){if(o.once("socket",_Q),f.secureEndpoint){Cl("Upgrading socket connection to TLS");let A=f.servername||f.host;return YO.default.connect(Object.assign(Object.assign({},wQ(f,"host","hostname","path","port")),{socket:x,servername:A}))}return x}x.destroy();let I=new ZO.default.Socket({writable:!1});return I.readable=!0,o.once("socket",(A)=>{Cl("replaying proxy buffer for failed request"),yQ.default(A.listenerCount("data")>0),A.push(R),A.push(null)}),I})}}ys.default=XO;function _Q(o){o.resume()}function zQ(o,f){return Boolean(!f&&o===80||f&&o===443)}function CQ(o){return typeof o==="string"?/^https:?$/i.test(o):!1}function wQ(o,...f){let h={},y;for(y in o)if(!f.includes(y))h[y]=o[y];return h}});var tI=i(function(ky,eI){var SQ=ky&&ky.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},Ey=SQ(QO());function Ty(o){return new Ey.default(o)}(function(o){o.HttpsProxyAgent=Ey.default,o.prototype=Ey.default.prototype})(Ty||(Ty={}));eI.exports=Ty});var oI=i(function(i2e,rI){var wl;rI.exports=function(){if(!wl){try{wl=Ct()("follow-redirects")}catch(o){}if(typeof wl!=="function")wl=function(){}}wl.apply(null,arguments)}});var cI=i(function(s2e,Fy){var Tl=c("url"),Sl=Tl.URL,EQ=c("http"),TQ=c("https"),Dy=c("stream").Writable,By=c("assert"),nI=oI();(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 Ly=!1;try{By(new Sl(""))}catch(o){Ly=o.code==="ERR_INVALID_URL"}var kQ=["Authorization","Proxy-Authorization","Cookie"],OQ=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Ny=["abort","aborted","connect","error","socket","timeout"],jy=Object.create(null);Ny.forEach(function(o){jy[o]=function(f,h,y){this._redirectable.emit(o,f,h,y)}});var Iy=kl("ERR_INVALID_URL","Invalid URL",TypeError),Ry=kl("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),IQ=kl("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Ry),RQ=kl("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),AQ=kl("ERR_STREAM_WRITE_AFTER_END","write after end"),PQ=Dy.prototype.destroy||sI;function go(o,f){if(Dy.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 Ry?x:new Ry({cause:x}))}},this._headerFilter=new RegExp("^(?:"+kQ.concat(o.sensitiveHeaders).map(jQ).join("|")+")$","i"),this._performRequest()}go.prototype=Object.create(Dy.prototype);go.prototype.abort=function(){qy(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};go.prototype.destroy=function(o){return qy(this._currentRequest,o),PQ.call(this,o),this};go.prototype.write=function(o,f,h){if(this._ending)throw new AQ;if(!bs(o)&&!LQ(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 RQ),this.abort()};go.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}};go.prototype.setHeader=function(o,f){this._options.headers[o]=f,this._currentRequest.setHeader(o,f)};go.prototype.removeHeader=function(o){delete this._options.headers[o],this._currentRequest.removeHeader(o)};go.prototype.setTimeout=function(o,f){var h=this;function y(C){C.setTimeout(o),C.removeListener("timeout",C.destroy),C.addListener("timeout",C.destroy)}function x(C){if(h._timeout)clearTimeout(h._timeout);h._timeout=setTimeout(function(){h.emit("timeout"),z()},o),y(C)}function z(){if(h._timeout)clearTimeout(h._timeout),h._timeout=null;if(h.removeListener("abort",z),h.removeListener("error",z),h.removeListener("response",z),h.removeListener("close",z),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",z),this.on("error",z),this.on("response",z),this.on("close",z),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(o){go.prototype[o]=function(f,h){return this._currentRequest[o](f,h)}});["aborted","connection","socket"].forEach(function(o){Object.defineProperty(go.prototype,o,{get:function(){return this._currentRequest[o]}})});go.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)}};go.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 Ny)y.on(x,jy[x]);if(this._currentUrl=/^\//.test(this._options.path)?Tl.format(this._options):this._options.path,this._isRedirect){var z=0,C=this,w=this._requestBodyBuffers;(function S(E){if(y===C._currentRequest){if(E)C.emit("error",E);else if(z<w.length){var T=w[z++];if(!y.finished)y.write(T.data,T.encoding,S)}else if(C._ended)y.end()}})()}};go.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(qy(this._currentRequest),o.destroy(),++this._redirectCount>this._options.maxRedirects)throw new IQ;var y,x=this._options.beforeRedirect;if(x)y=Object.assign({Host:o.req.getHeader("host")},this._options.headers);var z=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=[],Oy(/^content-/i,this._options.headers);var C=Oy(/^host$/i,this._options.headers),w=My(this._currentUrl),S=C||w.host,E=/^\w+:/.test(h)?this._currentUrl:Tl.format(Object.assign(w,{host:S})),T=DQ(h,E);if(nI("redirecting to",T.href),this._isRedirect=!0,Ay(T,this._options),T.protocol!==w.protocol&&T.protocol!=="https:"||T.host!==S&&!BQ(T.host,S))Oy(this._headerFilter,this._options.headers);if(vs(x)){var k={headers:o.headers,statusCode:f},O={url:E,method:z,headers:y};x(this._options,k,O),this._sanitizeOptions(this._options)}this._performRequest()};function iI(o){var f={maxRedirects:21,maxBodyLength:10485760},h={};return Object.keys(o).forEach(function(y){var x=y+":",z=h[x]=o[y],C=f[y]=Object.create(z);function w(E,T,k){if(NQ(E))E=Ay(E);else if(bs(E))E=Ay(My(E));else k=T,T=aI(E),E={protocol:x};if(vs(T))k=T,T=null;if(T=Object.assign({maxRedirects:f.maxRedirects,maxBodyLength:f.maxBodyLength},E,T),T.nativeProtocols=h,!bs(T.host)&&!bs(T.hostname))T.hostname="::1";return By.equal(T.protocol,x,"protocol mismatch"),nI("options",T),new go(T,k)}function S(E,T,k){var O=C.request(E,T,k);return O.end(),O}Object.defineProperties(C,{request:{value:w,configurable:!0,enumerable:!0,writable:!0},get:{value:S,configurable:!0,enumerable:!0,writable:!0}})}),f}function sI(){}function My(o){var f;if(Ly)f=new Sl(o);else if(f=aI(Tl.parse(o)),!bs(f.protocol))throw new Iy({input:o});return f}function DQ(o,f){return Ly?new Sl(o,f):My(Tl.resolve(f,o))}function aI(o){if(/^\[/.test(o.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(o.hostname))throw new Iy({input:o.href||o});if(/^\[/.test(o.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(o.host))throw new Iy({input:o.href||o});return o}function Ay(o,f){var h=f||{};for(var y of OQ)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 Oy(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 qy(o,f){for(var h of Ny)o.removeListener(h,jy[h]);o.on("error",sI),o.destroy(f)}function BQ(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 LQ(o){return typeof o==="object"&&"length"in o}function NQ(o){return Sl&&o instanceof Sl}function jQ(o){return o.replace(/[[\]\\/()*+?.^$|]/g,"\\$&")}Fy.exports=iI({http:EQ,https:TQ});Fy.exports.wrap=iI});var Ss=i(function(a2e,jR){/*! Axios v1.20.0 Copyright (c) 2026 Matt Zabriskie and contributors */var UI=$O(),MQ=c("crypto"),qQ=c("url"),$I=tI(),VI=c("http"),HI=c("https"),GI=c("http2"),ib=c("util"),lI=c("path"),FQ=cI(),Bo=c("zlib"),yo=c("stream"),UQ=c("events");function KI(o,f){return function(){return o.apply(f,arguments)}}var{toString:$Q}=Object.prototype,{getPrototypeOf:Ei}=Object,{iterator:Ml,toStringTag:WI}=Symbol,Bl=(({hasOwnProperty:o})=>(f,h)=>o.call(f,h))(Object.prototype),JI=(o)=>typeof o==="string"&&(o==="__proto__"||o==="constructor"||o==="prototype"),ZI=(o,f,h)=>o===Object.prototype||!h&&f===null,VQ=(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(JI(h))return!1;let y=Object.getOwnPropertyDescriptor(o,h);return!!y&&y.configurable&&y.writable===!0})},Ll=(o,f)=>{let h=o,y=[];while(h!=null){if(y.indexOf(h)!==-1)return!1;y.push(h);let x=Ei(h);if(ZI(h,x,h===o))return!1;if(Bl(h,f))return!0;h=x}return!1},HQ=(o,f)=>o!=null&&Ll(o,f)?o[f]:void 0,GQ=(o)=>{if(o==null||typeof o!=="object"&&typeof o!=="function")return o;let f=Ei(o);if(f===null&&VQ(o))return o;let h=Object.create(null),y=Object.create(null),x=[],z=o;while(z!=null){if(x.indexOf(z)!==-1)break;x.push(z);let C=z===o?f:Ei(z);if(ZI(z,C,z===o))break;let w=Object.getOwnPropertyNames(z);if(Object.getOwnPropertySymbols)w.push(...Object.getOwnPropertySymbols(z));for(let S of w){if(JI(S))continue;if(!Bl(y,S))h[S]=o[S],y[S]=!0}z=C}return h},sb=((o)=>(f)=>{let h=$Q.call(f);return o[h]||(o[h]=h.slice(8,-1).toLowerCase())})(Object.create(null)),Lo=(o)=>(o=o.toLowerCase(),(f)=>sb(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)&&bo(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}var YI=Lo("ArrayBuffer");function KQ(o){let f;if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)f=ArrayBuffer.isView(o);else f=o&&o.buffer&&YI(o.buffer);return f}var WQ=Mp("string"),bo=Mp("function"),XI=Mp("number"),Ma=(o)=>o!==null&&typeof o==="object",JQ=(o)=>o===!0||o===!1,wp=(o)=>{if(!Ma(o))return!1;let f=Ei(o);return(f===null||f===Object.prototype||Ei(f)===null)&&!Ll(o,WI)&&!Ll(o,Ml)},ZQ=(o)=>{if(!Ma(o)||ja(o))return!1;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch(f){return!1}},YQ=Lo("Date"),XQ=Lo("File"),QQ=(o)=>!!(o&&typeof o.uri<"u"),eee=(o)=>o&&typeof o.getParts<"u",tee=Lo("Blob"),ree=Lo("FileList"),oee=Lo("Set"),nee=(o)=>Ma(o)&&bo(o.pipe);function iee(){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 uI=iee(),dI=typeof uI.FormData<"u"?uI.FormData:void 0,see=(o)=>{if(!o)return!1;if(dI&&o instanceof dI)return!0;let f=Ei(o);if(!f||f===Object.prototype)return!1;if(!bo(o.append))return!1;let h=sb(o);return h==="formdata"||h==="object"&&bo(o.toString)&&o.toString()==="[object FormData]"},aee=Lo("URLSearchParams"),[cee,lee,uee,dee]=["ReadableStream","Request","Response","Headers"].map(Lo),pee=(o)=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ql(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 z=h?Object.getOwnPropertyNames(o):Object.keys(o),C=z.length,w;for(y=0;y<C;y++)w=z[y],f.call(null,o[w],w,o)}}function QI(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})(),eR=(o)=>!Cs(o)&&o!==xs;function Qy(...o){let{caseless:f,skipUndefined:h}=eR(this)&&this||{},y={},x=(z,C)=>{if(C==="__proto__"||C==="constructor"||C==="prototype")return;let w=f&&typeof C==="string"&&QI(y,C)||C,S=Bl(y,w)?y[w]:void 0;if(wp(S)&&wp(z))y[w]=Qy(S,z);else if(wp(z))y[w]=Qy({},z);else if(zs(z))y[w]=z.slice();else if(!h||!Cs(z))y[w]=z};for(let z=0,C=o.length;z<C;z++){let w=o[z];if(!w||ja(w))continue;if(ql(w,x),typeof w!=="object"||zs(w))continue;let S=Object.getOwnPropertySymbols(w);for(let E=0;E<S.length;E++){let T=S[E];if(wee.call(w,T))x(w[T],T)}}return y}var fee=(o,f,h,{allOwnKeys:y}={})=>(ql(f,(x,z)=>{if(h&&bo(x))Object.defineProperty(o,z,{__proto__:null,value:KI(x,h),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty(o,z,{__proto__:null,value:x,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:y}),o),hee=(o)=>{if(o.charCodeAt(0)===65279)o=o.slice(1);return o},mee=(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)},gee=(o,f,h,y)=>{let x,z,C,w={};if(f=f||{},o==null)return f;do{x=Object.getOwnPropertyNames(o),z=x.length;while(z-- >0)if(C=x[z],(!y||y(C,o,f))&&!w[C])f[C]=o[C],w[C]=!0;o=h!==!1&&Ei(o)}while(o&&(!h||h(o,f))&&o!==Object.prototype);return f},yee=(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},bee=(o)=>{if(!o)return null;if(zs(o))return o;let f=o.length;if(!XI(f))return null;let h=Array(f);while(f-- >0)h[f]=o[f];return h},vee=((o)=>(f)=>o&&f instanceof o)(typeof Uint8Array<"u"&&Ei(Uint8Array)),xee=(o,f)=>{let y=(o&&o[Ml]).call(o),x;while((x=y.next())&&!x.done){let z=x.value;f.call(o,z[0],z[1])}},_ee=(o,f)=>{let h,y=[];while((h=o.exec(f))!==null)y.push(h);return y},zee=Lo("HTMLFormElement"),Cee=(o)=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(h,y,x){return y.toUpperCase()+x}),{propertyIsEnumerable:wee}=Object.prototype,See=Lo("RegExp"),tR=(o,f)=>{let h=Object.getOwnPropertyDescriptors(o),y={};ql(h,(x,z)=>{let C;if((C=f(x,z,o))!==!1)y[z]=C||x}),Object.defineProperties(o,y)},Eee=(o)=>{tR(o,(f,h)=>{if(bo(o)&&["arguments","caller","callee"].includes(h))return!1;let y=o[h];if(!bo(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+"'")}})},Tee=(o,f)=>{let h={},y=(x)=>{x.forEach((z)=>{h[z]=!0})};return zs(o)?y(o):y(String(o).split(f)),h},kee=()=>{},Oee=(o,f)=>o!=null&&Number.isFinite(o=+o)?o:f;function Iee(o){return!!(o&&bo(o.append)&&o[WI]==="FormData"&&o[Ml])}var Ree=(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(oee(y)){x=[];for(let z of y){let C=h(z);!Cs(C)&&x.push(C)}}else x=zs(y)?[]:{},ql(y,(z,C)=>{let w=h(z);!Cs(w)&&(x[C]=w)});return f.delete(y),x}}return y};return h(o)},Aee=Lo("AsyncFunction"),Pee=(o)=>o&&(Ma(o)||bo(o))&&bo(o.then)&&bo(o.catch),rR=((o,f)=>{if(o)return setImmediate;return f?((h,y)=>(xs.addEventListener("message",({source:x,data:z})=>{if(x===xs&&z===h)y.length&&y.shift()()},!1),(x)=>{y.push(x),xs.postMessage(h,"*")}))(`axios@${Math.random()}`,[]):(h)=>setTimeout(h)})(typeof setImmediate==="function",bo(xs.postMessage)),Dee=typeof queueMicrotask<"u"?queueMicrotask.bind(xs):typeof process<"u"&&process.nextTick||rR,oR=(o)=>o!=null&&bo(o[Ml]),Bee=(o)=>o!=null&&Ll(o,Ml)&&oR(o),V={isArray:zs,isArrayBuffer:YI,isBuffer:ja,isFormData:see,isArrayBufferView:KQ,isString:WQ,isNumber:XI,isBoolean:JQ,isObject:Ma,isPlainObject:wp,isEmptyObject:ZQ,isReadableStream:cee,isRequest:lee,isResponse:uee,isHeaders:dee,isUndefined:Cs,isDate:YQ,isFile:XQ,isReactNativeBlob:QQ,isReactNative:eee,isBlob:tee,isRegExp:See,isFunction:bo,isStream:nee,isURLSearchParams:aee,isTypedArray:vee,isFileList:ree,forEach:ql,merge:Qy,extend:fee,trim:pee,stripBOM:hee,inherits:mee,toFlatObject:gee,kindOf:sb,kindOfTest:Lo,endsWith:yee,toArray:bee,forEachEntry:xee,matchAll:_ee,isHTMLForm:zee,hasOwnProperty:Bl,hasOwnProp:Bl,hasOwnInPrototypeChain:Ll,getSafeProp:HQ,toSafeFlatObject:GQ,reduceDescriptors:tR,freezeMethods:Eee,toObjectSet:Tee,toCamelCase:Cee,noop:kee,toFiniteNumber:Oee,findKey:QI,global:xs,isContextDefined:eR,isSpecCompliantForm:Iee,toJSONObject:Ree,isAsyncFn:Aee,isThenable:Pee,setImmediate:rR,asap:Dee,isIterable:oR,isSafeIterable:Bee},Lee=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"]),Nee=(o)=>{let f={},h,y,x;return o&&o.split(`
81
+ `).forEach(function(C){x=C.indexOf(":"),h=C.substring(0,x).trim().toLowerCase(),y=C.substring(x+1).trim();let w=V.hasOwnProp(f,h);if(!h||w&&V.hasOwnProp(Lee,h))return;if(h==="set-cookie")if(w)f[h].push(y);else f[h]=[y];else f[h]=w?f[h]+", "+y:y}),f};function jee(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 Mee=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),qee=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ab(o,f){if(V.isArray(o))return o.map((h)=>ab(h,f));return jee(String(o).replace(f,""))}var Fee=(o)=>ab(o,Mee),Uee=(o)=>ab(o,qee);function cb(o){let f=Object.create(null);return V.forEach(o.toJSON(),(h,y)=>{f[y]=Uee(h)}),f}var pI=Symbol("internals");function Il(o){return o&&String(o).trim().toLowerCase()}function Tp(o){if(o===!1||o==null)return o;return V.isArray(o)?o.map(Tp):Fee(String(o))}function $ee(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 Vee=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Uy(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 Hee(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 Gee(o){let f=Object.create(null),h=String(o),y=0,x=!1,z=!1;function C(w){let S=Uy(h.slice(y,w)),E=S.indexOf("=");if(E<1)return;let T=Uy(S.slice(0,E));if(!Vee.test(T))return;let k=T.toLowerCase();if(k==="__proto__"||k==="constructor"||k==="prototype")return;let O=Uy(S.slice(E+1));f[k]=Hee(O)}for(let w=0;w<h.length;w++){let S=h.charCodeAt(w);if(x){if(z)z=!1;else if(S===92)z=!0;else if(S===34)x=!1}else if(S===34)x=!0;else if(S===44||S===59)C(w),y=w+1}return C(h.length),f}var Kee=(o)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(o.trim());function $y(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 Wee(o){return o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(f,h,y)=>h.toUpperCase()+y)}function Jee(o,f){let h=V.toCamelCase(" "+f);["get","set","has"].forEach((y)=>{Object.defineProperty(o,y+h,{__proto__:null,value:function(x,z,C){return this[y].call(this,f,x,z,C)},configurable:!0})})}class lr{constructor(o){o&&this.set(o)}set(o,f,h){let y=this;function x(C,w,S){let E=Il(w);if(!E)return;let T=V.findKey(y,E);if(!T||y[T]===void 0||S===!0||S===void 0&&y[T]!==!1)y[T||w]=Tp(C)}let z=(C,w)=>V.forEach(C,(S,E)=>x(S,E,w));if(V.isPlainObject(o)||o instanceof this.constructor)z(o,f);else if(V.isString(o)&&(o=o.trim())&&!Kee(o))z(Nee(o),f);else if(V.isObject(o)&&V.isSafeIterable(o)){let C=Object.create(null),w,S;for(let E of o){if(!V.isArray(E))throw TypeError("Object iterator must return a key-value pair");if(S=E[0],V.hasOwnProp(C,S))w=C[S],C[S]=V.isArray(w)?[...w,E[1]]:[w,E[1]];else C[S]=E[1]}z(C,f)}else o!=null&&x(f,o,h);return this}get(o,f){if(o=Il(o),o){let h=V.findKey(this,o);if(h){let y=this[h];if(!f)return y;if(f===!0)return $ee(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=Il(o),o){let h=V.findKey(this,o);return!!(h&&this[h]!==void 0&&(!f||$y(this,this[h],h,f)))}return!1}delete(o,f){let h=this,y=!1;function x(z){if(z=Il(z),z){let C=V.findKey(h,z);if(C&&(!f||$y(h,h[C],C,f)))delete h[C],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||$y(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 z=V.findKey(h,x);if(z){f[z]=Tp(y),delete f[x];return}let C=o?Wee(x):String(x).trim();if(C!==x)delete f[x];f[C]=Tp(y),h[C]=!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 Gee(o)}static concat(o,...f){let h=new this(o);return f.forEach((y)=>h.set(y)),h}static accessor(o){let h=(this[pI]=this[pI]={accessors:{}}).accessors,y=this.prototype;function x(z){let C=Il(z);if(!h[C])Jee(y,z),h[C]=!0}return V.isArray(o)?o.forEach(x):x(o),this}}lr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);V.reduceDescriptors(lr.prototype,({value:o},f)=>{let h=f[0].toUpperCase()+f.slice(1);return{get:()=>o,set(y){this[h]=y}}});V.freezeMethods(lr);var Bp="[REDACTED ****]";function Zee(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 Yee(o,f){let h=new Set(f.map((z)=>String(z).toLowerCase())),y=[],x=(z)=>{if(z===null||typeof z!=="object")return z;if(V.isBuffer(z))return z;if(y.indexOf(z)!==-1)return;if(z instanceof lr)z=z.toJSON();y.push(z);let C;if(V.isArray(z))C=[],z.forEach((w,S)=>{let E=x(w);if(!V.isUndefined(E))C[S]=E});else{if(!V.isPlainObject(z)&&Zee(z))return y.pop(),z;C=Object.create(null);for(let[w,S]of Object.entries(z)){let E=h.has(w.toLowerCase())?Bp:x(S);if(!V.isUndefined(E))C[w]=E}}return y.pop(),C};return x(o)}function fI(o){try{return String(o)}catch(f){return""}}function Xee(o){return o.errors.map((h)=>{try{return h&&h.message?fI(h.message):fI(h)}catch(y){return""}}).filter(Boolean).join("; ")||o.name||"AggregateError"}class ne extends Error{static from(o,f,h,y,x,z){let C=o.message;if(!C&&V.isArray(o.errors)&&o.errors.length)C=Xee(o);let w=new ne(C,f||o.code,h,y,x);if(Object.defineProperty(w,"cause",{__proto__:null,value:o,writable:!0,enumerable:!1,configurable:!0}),w.name=o.name,o.status!=null&&w.status==null)w.status=o.status;return z&&Object.assign(w,z),w}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?Yee(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 Vy={isBufferAvailable(){return typeof Buffer<"u"},from(o){return Buffer.from(o)}},nR=100;function eb(o){return V.isPlainObject(o)||V.isArray(o)}function iR(o){return V.endsWith(o,"[]")?o.slice(0,-2):o}function Hy(o,f,h){if(!o)return f;return o.concat(f).map(function(x,z){return x=iR(x),!h&&z?"["+x+"]":x}).join(h?".":"")}function Qee(o){return V.isArray(o)&&!o.some(eb)}var ete=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(UI||FormData);let y=(F,q)=>{let W=V.getSafeProp(h,F);return V.isUndefined(W)?q:W},x=y("metaTokens",!0),z=y("visitor")||A,C=y("dots",!1),w=y("indexes",!1),S=y("Blob")||typeof Blob<"u"&&Blob,E=y("maxDepth",nR),T=S&&V.isSpecCompliantForm(f),k=[];if(!V.isFunction(z))throw TypeError("visitor must be a function");function O(F){if(F===null)return"";if(V.isDate(F))return F.toISOString();if(V.isBoolean(F))return F.toString();if(!T&&V.isBlob(F))throw new ne("Blob is not supported. Use a Buffer instead.");if(V.isArrayBuffer(F)||V.isTypedArray(F)){if(T&&typeof S==="function")return new S([F]);if(Vy&&Vy.isBufferAvailable())return Vy.from(F);throw new ne("Blob is not supported. Use a Buffer instead.",ne.ERR_NOT_SUPPORT)}return F}function R(F){if(F>E)throw new ne("Object is too deeply nested ("+F+" levels). Max depth: "+E,ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function I(F,q){if(E===1/0)return JSON.stringify(F);let W=[];return JSON.stringify(F,function(te,le){if(!V.isObject(le))return le;while(W.length&&W[W.length-1]!==this)W.pop();return W.push(le),R(q+W.length-1),le})}function A(F,q,W){let ee=F;if(V.isReactNative(f)&&V.isReactNativeBlob(F))return f.append(Hy(W,q,C),O(F)),!1;if(F&&!W&&typeof F==="object"){if(V.endsWith(q,"{}"))q=x?q:q.slice(0,-2),F=I(F,1);else if(V.isArray(F)&&Qee(F)||(V.isFileList(F)||V.endsWith(q,"[]"))&&(ee=V.toArray(F)))return q=iR(q),ee.forEach(function(le,he){!(V.isUndefined(le)||le===null)&&f.append(w===!0?Hy([q],he,C):w===null?q:q+"[]",O(le))}),!1}if(eb(F))return!0;return f.append(Hy(W,q,C),O(F)),!1}let j=Object.assign(ete,{defaultVisitor:A,convertValue:O,isVisitable:eb});function P(F,q,W=0){if(V.isUndefined(F))return;if(R(W),k.indexOf(F)!==-1)throw Error("Circular reference detected in "+q.join("."));k.push(F),V.forEach(F,function(te,le){if((!(V.isUndefined(te)||te===null)&&z.call(f,te,V.isString(le)?le.trim():le,q,j))===!0)P(te,q?q.concat(le):[le],W+1)}),k.pop()}if(!V.isObject(o))throw TypeError("data must be an object");return P(o),f}function hI(o){let f={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(o).replace(/[!'()~]|%20/g,function(y){return f[y]})}function sR(o,f){this._pairs=[],o&&qp(o,this,f)}var aR=sR.prototype;aR.append=function(f,h){this._pairs.push([f,h])};aR.toString=function(f){let h=f?(y)=>f.call(this,y,hI):hI;return this._pairs.map(function(x){return h(x[0])+"="+h(x[1])},"").join("&")};function tte(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function lb(o,f,h){if(!f)return o;o=o||"";let y=V.isFunction(h)?{serialize:h}:h,x=V.getSafeProp(y,"encode")||tte,z=V.getSafeProp(y,"serialize"),C;if(z)C=z(f,y);else C=V.isURLSearchParams(f)?f.toString():new sR(f,y).toString(x);if(C){let w=o.indexOf("#");if(w!==-1)o=o.slice(0,w);o+=(o.indexOf("?")===-1?"?":"&")+C}return o}var Pl=Symbol("internals");function cR(o){return o?o.length:0}function mI(o){if(!o)return;while(o.length&&o[o.length-1]===null)o.pop()}function Dl(o,f){let h=o.handlers,y=cR(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,C){if(h[z.index]!==z.handler)f.handlerEntries.delete(C)});f.handlersLength=y}class tb{constructor(){this.handlers=[],this[Pl]={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[Pl];if(this.handlers==null)this.handlers=[];Dl(this,x);let z=x.nextId++;return this.handlers.push(y),x.handlerEntries.set(z,{handler:y,index:this.handlers.length-1}),x.handlersLength=this.handlers.length,z}eject(o){let f=this[Pl];Dl(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)mI(this.handlers),f.handlersLength=this.handlers.length}}clear(){if(this.handlers)this.handlers=[],Dl(this,this[Pl])}forEach(o){let f=this[Pl];Dl(this,f),f.iterationDepth++;try{V.forEach(this.handlers,function(y){if(y!==null)o(y)})}finally{if(!--f.iterationDepth)Dl(this,f),mI(this.handlers),f.handlersLength=cR(this.handlers)}}}var Up={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},rte=qQ.URLSearchParams,Gy="abcdefghijklmnopqrstuvwxyz",gI="0123456789",lR={DIGIT:gI,ALPHA:Gy,ALPHA_DIGIT:Gy+Gy.toUpperCase()+gI},ote=(o=16,f=lR.ALPHA_DIGIT)=>{let h="",{length:y}=f,x=new Uint32Array(o);MQ.randomFillSync(x);for(let z=0;z<o;z++)h+=f[x[z]%y];return h},nte={isNode:!0,classes:{URLSearchParams:rte,FormData:UI,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:lR,generateString:ote,protocols:["http","https","file","data"]},ub=typeof window<"u"&&typeof document<"u",rb=typeof navigator==="object"&&navigator||void 0,ite=ub&&(!rb||["ReactNative","NativeScript","NS"].indexOf(rb.product)<0),ste=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function")(),ate=ub&&window.location.href||"http://localhost",cte=Object.freeze({__proto__:null,hasBrowserEnv:ub,hasStandardBrowserEnv:ite,hasStandardBrowserWebWorkerEnv:ste,navigator:rb,origin:ate}),Wt={...cte,...nte};function lte(o,f){return qp(o,new Wt.classes.URLSearchParams,{visitor:function(h,y,x,z){if(Wt.isNode&&V.isBuffer(h))return this.append(y,h.toString("base64")),!1;return z.defaultVisitor.apply(this,arguments)},...f})}var yI=nR;function uR(o){if(o>yI)throw new ne("FormData field is too deeply nested ("+o+" levels). Max depth: "+yI,ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function ute(o){let f=[],h=/[^.[\]]+|\[([^.[\]]*)]/g,y;while((y=h.exec(o))!==null)uR(f.length),f.push(y[0]==="[]"?"":y[1]||y[0]);return f}function dte(o){let f={},h=Object.keys(o),y,x=h.length,z;for(y=0;y<x;y++)z=h[y],f[z]=o[z];return f}function dR(o){function f(h,y,x,z){uR(z);let C=h[z++];if(C==="__proto__")return!0;let w=Number.isFinite(+C),S=z>=h.length;if(C=!C&&V.isArray(x)?x.length:C,S){if(V.hasOwnProp(x,C))x[C]=V.isArray(x[C])?x[C].concat(y):[x[C],y];else x[C]=y;return!w}if(!V.hasOwnProp(x,C)||!V.isObject(x[C]))x[C]=[];if(f(h,y,x[C],z)&&V.isArray(x[C]))x[C]=dte(x[C]);return!w}if(V.isFormData(o)&&V.isFunction(o.entries)){let h={};return V.forEachEntry(o,(y,x)=>{f(ute(y),x,h,0)}),h}return null}var pR=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Ba=(o,f)=>o!=null&&V.hasOwnProp(o,f)?o[f]:void 0;function pte(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 Fl={transitional:Up,adapter:["xhr","http","fetch"],transformRequest:[function(f,h){let y=h.getContentType()||"",x=y.indexOf("application/json")>-1,z=V.isObject(f);if(z&&V.isHTMLForm(f))f=new FormData(f);if(V.isFormData(f))return x?JSON.stringify(dR(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 w;if(z){let S=Ba(this,"formSerializer");if(y.indexOf("application/x-www-form-urlencoded")>-1)return lte(f,S).toString();if((w=V.isFileList(f))||y.indexOf("multipart/form-data")>-1){let E=Ba(this,"env"),T=E&&E.FormData;return qp(w?{"files[]":f}:f,T&&new T,S)}}if(z||x)return h.setContentType("application/json",!1),pte(f);return f}],transformResponse:[function(f){let h=Ba(this,"transitional")||Fl.transitional,y=h&&h.forcedJSONParsing,x=Ba(this,"responseType"),z=x==="json";if(V.isResponse(f)||V.isReadableStream(f))return f;if(f&&V.isString(f)&&(y&&!x||z)){let w=!(h&&h.silentJSONParsing)&&z;try{return JSON.parse(f,Ba(this,"parseReviver"))}catch(S){if(w){if(S.name==="SyntaxError")throw ne.from(S,ne.ERR_BAD_RESPONSE,this,null,Ba(this,"response"));throw S}}}return f}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wt.classes.FormData,Blob:Wt.classes.Blob},validateStatus:function(f){return f>=200&&f<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(pR,(o)=>{Fl.headers[o]={}});function Ky(o,f){let h=this||Fl,y=f||h,x=lr.from(y.headers),z=y.data;return V.forEach(o,function(w){z=w.call(h,z,x.normalize(),f?f.status:void 0)}),x.normalize(),z}function fR(o){return!!(o&&o.__CANCEL__)}class Ti 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 fte(o){if(typeof o!=="string")return!1;return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function hte(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 mte=/[\t\n\r]/g;function hR(o){if(typeof o!=="string")return o;let f=0;while(f<o.length&&o.charCodeAt(f)<=32)f++;return o.slice(f).replace(mte,"")}var gte=/^https?:(?!\/\/)/i;function yte(o){if(!o)return o;return o.replace(/(^|&)([^=&]*=)?[^&]+/g,(f,h,y="")=>`${h}${y}${Bp}`)}function bte(o){let f=o.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Bp}@`),h=f.indexOf("#"),x=(h===-1?f:f.slice(0,h)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Bp}`);if(h===-1)return x;return`${x}#${yte(f.slice(h+1))}`}function bI(o,f){if(typeof o==="string"){let h=hR(o);if(gte.test(h))throw new ne(`Invalid URL ${JSON.stringify(bte(h))}: missing "//" after protocol`,ne.ERR_INVALID_URL,f)}}function db(o,f,h,y){bI(f,y);let x=!fte(f);if(o&&(x||h===!1))return bI(o,y),hte(o,f);return f}var vte={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function xte(o){try{return new URL(o)}catch{return null}}function _te(o){var f=(typeof o==="string"?xte(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)||vte[h]||0,!zte(y,x))return"";var z=ob(h+"_proxy")||ob("all_proxy");if(z&&z.indexOf("://")===-1)z=h+"://"+z;return z}function zte(o,f){var h=ob("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+)$/),z=x?x[1]:y,C=x?parseInt(x[2]):0;if(C&&C!==f)return!0;if(!/^[.*]/.test(z))return o!==z;if(z.charAt(0)==="*")z=z.slice(1);return!o.endsWith(z)})}function ob(o){return process.env[o.toLowerCase()]||process.env[o.toUpperCase()]||""}var Nl="1.20.0";function kp(o){let f=/^([-+\w]{1,25}):(?:\/\/)?/.exec(o);return f&&f[1]||""}var Cte=/^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function wte(o,f,h){let y=h&&h.Blob||Wt.classes.Blob,x=kp(o);if(f===void 0&&y)f=!0;if(x==="data"){o=x.length?o.slice(x.length+1):o;let z=Cte.exec(o);if(!z)throw new ne("Invalid URL",ne.ERR_INVALID_URL);let C=z[1],w=z[2],S=z[3]?"base64":"utf8",E=z[4],T="";if(C)T=w?C+w:C;else if(w)T="text/plain"+w;let k=S==="base64"?Buffer.from(E,"base64"):Buffer.from(decodeURIComponent(E),S);if(f){if(!y)throw new ne("Blob is not supported",ne.ERR_NOT_SUPPORT);return new y([k],{type:T})}return k}throw new ne("Unsupported protocol "+x,ne.ERR_NOT_SUPPORT)}var Ste=["content-type","content-length"];function mR(o,f,h){if(h!=="content-only"){o.set(f);return}Object.entries(f||{}).forEach(([y,x])=>{if(Ste.includes(y.toLowerCase()))o.set(y,x)})}var Wy=Symbol("internals");class nb extends yo.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[Wy]={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[Wy];if(f.onReadCallback)f.onReadCallback();return super._read(o)}_transform(o,f,h){let y=this[Wy],x=y.maxRate,z=this.readableHighWaterMark,C=y.timeWindow,w=1000/C,S=x/w,E=y.minChunkSize!==!1?Math.max(y.minChunkSize,S*0.01):0,T=(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,j=z,P,F=0;if(x){let q=Date.now();if(!y.ts||(F=q-y.ts)>=C)y.ts=q,P=S-y.bytes,y.bytes=P<0?-P:0,F=0;P=S-y.bytes}if(x){if(P<=0)return setTimeout(()=>{R(null,O)},C-F);if(P<j)j=P}if(j&&I>j&&I-j>E)A=O.subarray(j),O=O.subarray(0,j);T(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:vI}=Symbol,gR=async function*(o){if(o.stream)yield*o.stream();else if(o.arrayBuffer)yield await o.arrayBuffer();else if(o[vI])yield*o[vI]();else yield o},Ete=Wt.ALPHABET.ALPHA_DIGIT+"-_",jl=typeof TextEncoder==="function"?new TextEncoder:new ib.TextEncoder,_s=`\r
83
+ `,Tte=jl.encode(_s),kte=2;class yR{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=jl.encode(String(f).replace(/\r?\n|\r\n?/g,_s));else{let z=String(f.type||"application/octet-stream").replace(/[\r\n]/g,"");x+=`Content-Type: ${z}${_s}`}this.headers=jl.encode(x+_s),this.contentLength=y?f.byteLength:f.size,this.size=this.headers.byteLength+this.contentLength+kte,this.name=o,this.value=f}async*encode(){yield this.headers;let{value:o}=this;if(V.isTypedArray(o))yield o;else yield*gR(o);yield Tte}static escapeName(o){return String(o).replace(/[\r\n"]/g,(f)=>({"\r":"%0D","\n":"%0A",'"':"%22"})[f])}}var Ote=(o,f,h)=>{let{tag:y="form-data-boundary",size:x=25,boundary:z=y+"-"+Wt.generateString(x,Ete)}=h||{};if(!V.isFormData(o))throw TypeError("FormData instance required");if(z.length<1||z.length>70)throw Error("boundary must be 1-70 characters long");let C=jl.encode("--"+z+_s),w=jl.encode("--"+z+"--"+_s),S=w.byteLength,E=Array.from(o.entries()).map(([k,O])=>{let R=new yR(k,O);return S+=R.size,R});S+=C.byteLength*E.length,S=V.toFiniteNumber(S);let T={"Content-Type":`multipart/form-data; boundary=${z}`};if(Number.isFinite(S))T["Content-Length"]=S;return f&&f(T),yo.Readable.from(async function*(){for(let k of E)yield C,yield*k.encode();yield w}())};class bR extends yo.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 vR{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 T=h.length;for(let k=0;k<T;k++){let[O,R]=h[k];if(!O.destroyed&&!O.closed&&ib.isDeepStrictEqual(R,f))return O}}let y=GI.connect(o,f),x,z,C=()=>{if(x)return;if(x=!0,z)clearTimeout(z),z=null;let T=h,k=T.length,O=k;while(O--)if(T[O][0]===y){if(k===1)delete this.sessions[o];else T.splice(O,1);if(!y.closed)y.close();return}},w=y.request,{sessionTimeout:S}=f;if(S!=null){let T=0;y.request=function(){let k=w.apply(this,arguments);if(T++,z)clearTimeout(z),z=null;return k.once("close",()=>{if(!--T)z=setTimeout(()=>{z=null,C()},S)}),k}}y.once("close",C),y.once("error",C);let E=[y,f];return h?h.push(E):h=this.sessions[o]=[E],y}}var Ite=(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(z){y(z)}},y)}:o,Rte=new Set(["localhost","0.0.0.0"]),xR=(o)=>{let f=o.length;while(f&&o.charCodeAt(f-1)===46)f--;return f===o.length?o:o.slice(0,f)},_R=(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)},Jy=(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},zR=(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=xR(f),!/^[0-9.xXa-fA-F]+$/.test(f))return o;let h=f.split(".");if(h.some((T)=>T===""))return o;if(h.length===4){let T=h.map(Jy);if(T.some((k)=>k===null||k<0||k>255))return o;return T.join(".")}if(h.length>4)return o;if(h.length===1)return o;let y=h.slice(0,-1),x=h[h.length-1],z=4-y.length,C=Jy(x);if(C===null)return o;let w=(1<<8*z)-1;if(C<0||C>w)return o;let S=Array(z).fill(0);for(let T=z-1,k=C;T>=0;T--,k>>=8)S[T]=k&255;let E=y.map(Jy);if(E.some((T)=>T===null||T<0||T>255))return o;return[...E,...S].join(".")},Zy=(o)=>/^0{1,4}$/.test(o),Ate=(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),z=y?y.split(":"):[],C=x?x.split(":"):[];return z.length+C.length<8&&z.every(Zy)&&C.every(Zy)}let h=o.split(":");return h.length===8&&h.every(Zy)},Pte=(o)=>{if(o==="::1")return!0;let f=o.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(f)return _R(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},xI=(o)=>{if(!o)return!1;if(Rte.has(o))return!0;if(_R(o))return!0;if(Ate(o))return!0;return Pte(o)},Dte={http:80,https:443,ws:80,wss:443,ftp:21},Bte=(o)=>{let f=o,h=0;if(f.charAt(0)==="["){let z=f.indexOf("]");if(z!==-1){let C=f.slice(1,z),w=f.slice(z+1);if(w.charAt(0)===":"&&/^\d+$/.test(w.slice(1)))h=Number.parseInt(w.slice(1),10);return[C,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]},Lte=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,Nte=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,CR=(o)=>{if(typeof o!=="string"||o.indexOf(":")===-1)return o;let f=o.match(Lte);if(f)return f[1];let h=o.match(Nte);if(h){let y=parseInt(h[1],16),x=parseInt(h[2],16);return`${y>>8}.${y&255}.${x>>8}.${x&255}`}return o},jte=/^(?:0|[1-9]\d{0,2})$/,wR=(o)=>{let f=o.split(".");return f.length===4&&f.every((h)=>jte.test(h)&&Number(h)<=255)?f.map(Number):null},Mte=/^[0-9a-f]{1,4}$/i,qte=(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)=>!Mte.test(y)))return null;return h.flatMap((y)=>{let x=Number.parseInt(y,16);return[x>>8&255,x&255]})},SR=(o)=>{if(typeof o!=="string"||!o)return null;return o.indexOf(":")!==-1?qte(o):wR(o)},_I=(o)=>{if(!o)return o;if(o.charAt(0)==="["&&o.charAt(o.length-1)==="]")o=o.slice(1,-1);let f=xR(o),h=zR(f);if(h!==f)return h;return CR(f)},Fte=(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 z=f.indexOf(":")!==-1;if(z)try{f=new URL(`http://[${f}]/`).hostname.slice(1,-1)}catch(C){return null}else if(f=zR(f),!wR(f))return null;return{normalized:CR(f),wasIPv6:z}},Ute=/^(.+)\/(0|[1-9]\d{0,2})$/,$te=(o)=>{if(o.indexOf("/")===-1)return;let f=Ute.exec(o);if(!f)return null;let h=Number(f[2]),y=Fte(f[1]);if(!y)return null;let{normalized:x,wasIPv6:z}=y;if(z&&x.indexOf(":")===-1){if(h<96)return null;h-=96}let C=SR(x);if(!C||h>C.length*8)return null;return{bytes:C,prefix:h}},Vte=(o,f,h)=>{let y=h>>3;for(let z=0;z<y;z++)if(o[z]!==f[z])return!1;let x=h&7;if(x){let z=255<<8-x&255;if((o[y]&z)!==(f[y]&z))return!1}return!0};function Hte(o){let f;try{f=new URL(o)}catch(C){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)||Dte[f.protocol.split(":",1)[0]]||0,x=_I(f.hostname.toLowerCase()),z=SR(x);return h.split(/[\s,]+/).some((C)=>{if(!C)return!1;if(C==="*")return!0;let w=$te(C);if(w!==void 0)return w!==null&&!!z&&z.length===w.bytes.length&&Vte(z,w.bytes,w.prefix);let[S,E]=Bte(C);if(S=_I(S),!S)return!1;if(E&&E!==y)return!1;if(S.charAt(0)==="*")S=S.slice(1);if(S.charAt(0)===".")return x.endsWith(S);return x===S||xI(x)&&xI(S)})}function Gte(o,f){o=o||10;let h=Array(o),y=Array(o),x=0,z=0,C;return f=f!==void 0?f:1000,function(S){let E=Date.now(),T=y[z];if(!C)C=E;h[x]=S,y[x]=E;let k=z,O=0;while(k!==x)O+=h[k++],k=k%o;if(x=(x+1)%o,x===z)z=(z+1)%o;if(E-C<f)return;let R=T&&E-T;return R?Math.round(O*1000/R):void 0}}function Kte(o,f){let h=0,y=1000/f,x,z,C=(T,k=Date.now())=>{if(h=k,x=null,z)clearTimeout(z),z=null;o(...T)};return[(...T)=>{let k=Date.now(),O=k-h;if(O>=y)C(T,k);else if(x=T,!z)z=setTimeout(()=>{z=null,C(x)},y-O)},()=>x&&C(x),(...T)=>C(T)]}var Na=(o,f,h=3)=>{let y=0,x=Gte(50,250);return Kte((z)=>{if(!z||!V.isNumber(z.loaded))return;let C=z.loaded,w=z.lengthComputable?z.total:void 0,S=Math.max(0,w!=null?Math.min(C,w):C),E=Math.max(0,S-y),T=x(E);y=Math.max(y,S);let k={loaded:S,total:w,progress:w?S/w:void 0,bytes:E,rate:T?T:void 0,estimated:T&&w?(w-S)/T:void 0,event:z,lengthComputable:w!=null,[f?"download":"upload"]:!0};o(k)},h)},Lp=(o,f)=>{let h=o!=null;return[(y)=>f[0]({lengthComputable:h,total:o,loaded:y}),f[1]]},Np=(o,f=V.asap)=>(...h)=>f(()=>o(...h)),zI=(o)=>o>=48&&o<=57||o>=65&&o<=70||o>=97&&o<=102,ER=(o,f,h)=>f+2<h&&zI(o.charCodeAt(f+1))&&zI(o.charCodeAt(f+2)),CI=(o)=>o<=57?o-48:(o&223)-55,Wte=(o)=>o>=65&&o<=90||o>=97&&o<=122||o>=48&&o<=57||o===43||o===47||o===45||o===95,Jte=(o)=>o===9||o===10||o===12||o===13||o===32,Zte=(o)=>{let f=Math.floor(o/4),h=o%4;return f*3+(h===2?1:h===3?2:0)},TR=(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)},Yte=(o)=>{let f=o.length,h=0,y=0,x=!1;for(let z=0;z<f;z++){let C=o.charCodeAt(z);if(C===37&&ER(o,z,f))C=CI(o.charCodeAt(z+1))*16+CI(o.charCodeAt(z+2)),z+=2;if(Jte(C))continue;if(C===61){y++;continue}if(!Wte(C)||y>0){x=!0;continue}h++}if(x||y>2||y>0&&(h+y)%4!==0||h%4===1)return TR(o);return Zte(h)},kR=(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 C=0;for(let w=0,S=x.length;w<S;w++){let E=x.charCodeAt(w);if(E===37&&ER(x,w,S))C+=1,w+=2;else if(E<128)C+=1;else if(E<2048)C+=2;else if(E>=55296&&E<=56319&&w+1<S){let T=x.charCodeAt(w+1);if(T>=56320&&T<=57343)C+=4,w++;else C+=3}else C+=3}return C};function Xte(o){let f=typeof o==="string"?o.indexOf("#"):-1;return kR(f===-1?o:o.slice(0,f),Yte)}function Qte(o){return kR(o,TR)}var wI={flush:Bo.constants.Z_SYNC_FLUSH,finishFlush:Bo.constants.Z_SYNC_FLUSH},ere={flush:Bo.constants.BROTLI_OPERATION_FLUSH,finishFlush:Bo.constants.BROTLI_OPERATION_FLUSH},tre={flush:Bo.constants.ZSTD_e_flush,finishFlush:Bo.constants.ZSTD_e_flush},OR=V.isFunction(Bo.createBrotliDecompress),IR=V.isFunction(Bo.createZstdDecompress),RR="gzip, compress, deflate"+(OR?", br":""),rre=RR+(IR?", zstd":""),SI=typeof process<"u"&&process.nextTick?process.nextTick.bind(process):V.asap,{http:ore,https:nre}=FQ,pb=/https:?/,EI=Symbol("axios.http.socketListener"),Ip=Symbol("axios.http.currentReq");function ire(o){let f=this[Ip];if(f&&!f.destroyed)f.destroy(o)}var AR=Symbol("axios.http.installedTunnel"),sre=new Map,TI=new WeakMap,kI={22:21,24:5};function are(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 kI[f]!=null&&h>=kI[f]}function OI(o,f=process.versions&&process.versions.node){if(!are(f))return!1;let h=o&&o.options;return Boolean(h&&V.hasOwnProp(h,"proxyEnv")&&h.proxyEnv!=null)}function cre(o,f,h){return pb.test(o.protocol)?h||HI.globalAgent:f||VI.globalAgent}function lre(o,f){let h=o.protocol+"//"+o.hostname+":"+(o.port||"")+"#"+(o.auth||""),y=f?TI.get(f)||TI.set(f,new Map).get(f):sre,x=y.get(h);if(x)return x;let z=f&&f.options?{...f.options,...o}:o;if(x=new $I(z),f&&f.options){let C={...f.options},w=x.callback;x.callback=function(E,T){return w.call(this,E,{...C,...T})}}return x[AR]=!0,y.set(h,x),x}var II=Wt.protocols.map((o)=>o+":"),RI=(o)=>{if(!V.isString(o))return o;try{return decodeURIComponent(o)}catch(f){return o}},AI=(o,[f,h])=>(o.on("end",h).on("error",h),f),ure=new vR;function dre(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 pre(o,f){if(!o)return;Object.keys(o).forEach((h)=>{if(f.has(h.toLowerCase()))delete o[h]})}function fre(o,f){if(!f)return!1;try{return new URL(f.url).origin===new URL(o.href).origin}catch(h){return!1}}function PR(o,f,h,y,x,z,C=!0){let w=f,S=cre(o,z,x);if(!w&&w!==!1&&C&&!OI(S)){let E=_te(h);if(E){if(!Hte(h))w=new URL(E)}}if(y&&o.headers){for(let E of Object.keys(o.headers))if(E.toLowerCase()==="proxy-authorization")delete o.headers[E]}if(y&&o.agent&&o.agent[AR])o.agent=void 0;if(w){let E=w instanceof URL,T=(A)=>E||V.hasOwnProp(w,A)?w[A]:void 0,k=T("username"),O=T("password"),R=V.hasOwnProp(w,"auth")?w.auth:void 0;if(k)R=(k||"")+":"+(O||"");if(R){let A=typeof R==="object",j=A&&V.hasOwnProp(R,"username")?R.username:void 0,P=A&&V.hasOwnProp(R,"password")?R.password:void 0;if(Boolean(j||P))R=(j||"")+":"+(P||"");else if(A)throw new ne("Invalid proxy authorization",ne.ERR_BAD_OPTION,{proxy:w})}if(pb.test(o.protocol)){if(!(x instanceof $I)){let A=T("hostname")||T("host"),j=T("port"),P=T("protocol"),F=P?P.includes(":")?P:`${P}:`:"http:",q=A&&A.includes(":")&&!A.startsWith("[")?`[${A}]`:A,W=new URL(`${F}//${q}${j?":"+j:""}`),ee={protocol:W.protocol,hostname:W.hostname.replace(/^\[|\]$/g,""),port:W.port,auth:R&&typeof R==="string"?R:void 0};if(W.protocol==="https:")ee.ALPNProtocols=["http/1.1"];let te=lre(ee,x);if(o.agent=te,o.agents)o.agents.https=te}}else{if(R){let F=Buffer.from(R,"utf8").toString("base64");o.headers["Proxy-Authorization"]="Basic "+F}let A=!1;for(let F of Object.keys(o.headers))if(F.toLowerCase()==="host"){A=!0;break}if(!A)o.headers.host=o.hostname+(o.port?":"+o.port:"");let j=T("hostname")||T("host");o.hostname=j,o.host=j,o.port=T("port"),o.path=h;let P=T("protocol");if(P)o.protocol=P.includes(":")?P:`${P}:`}}return o.beforeRedirects.proxy=function(T){PR(T,f,T.href,!0,x,z,C)},Boolean(w||f!==!1&&C&&OI(S))}var hre=typeof process<"u"&&V.kindOf(process)==="process",mre=(o)=>new Promise((f,h)=>{let y,x,z=(S,E)=>{if(x)return;x=!0,y&&y(S,E)},C=(S)=>{z(S),f(S)},w=(S)=>{z(S,!0),h(S)};o(C,w,(S)=>y=S).catch(w)}),gre=({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)}},PI=(o,f)=>gre(V.isObject(o)?o:{address:o,family:f}),DI=new WeakMap,yre=(o)=>{let f=DI.get(o);if(f)return f;let h=Ite(o,(y)=>V.isArray(y)?y:[y]);return f=(y,x,z)=>{h(y,x,(C,w,S)=>{if(C)return z(C);let E;try{E=V.isArray(w)?w.map((T)=>PI(T)):[PI(w,S)]}catch(T){return z(T)}x.all?z(C,E):z(C,E[0].address,E[0].family)})},DI.set(o,f),f},bre={request(o,f){let h=o.protocol+"//"+o.hostname+":"+(o.port||(o.protocol==="https:"?443:80)),{http2Options:y,headers:x}=o,z=ure.getSession(h,y),{HTTP2_HEADER_SCHEME:C,HTTP2_HEADER_METHOD:w,HTTP2_HEADER_PATH:S,HTTP2_HEADER_STATUS:E}=GI.constants,T={[C]:o.protocol.replace(":",""),[w]:o.method,[S]:o.path};V.forEach(x,(O,R)=>{R.charAt(0)!==":"&&(T[R]=O)});let k=z.request(T);return k.once("response",(O)=>{let R=k;O=Object.assign({},O);let I=O[E];delete O[E],R.headers=O,R.statusCode=+I,f(R)}),k}},vre=hre&&function(f){return mre(async function(y,x,z){let C=(ve)=>V.getSafeProp(f,ve),w=C("transitional")||Up,S=C("data"),E=C("lookup"),T=C("family"),k=C("httpVersion");if(k===void 0)k=1;let O=k,R=C("http2Options"),I=C("httpAgent"),A=C("httpsAgent"),j=C("proxy"),P=C("responseType"),F=C("responseEncoding"),q=C("socketPath"),W=C("method").toUpperCase(),ee=C("maxRedirects"),te=C("maxBodyLength"),le=C("maxContentLength"),he=C("decompress"),ye,ke=!1,me,Ae;try{k=+k}catch(ve){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 He=k===2;if(E)E=yre(E);let Le=new UQ.EventEmitter;function Pe(ve){try{Le.emit("abort",!ve||ve.type?new Ti(null,f,me):ve)}catch(Se){}}function re(){if(Ae)clearTimeout(Ae),Ae=null}function oe(){let ve=C("timeout"),Se=ve?"timeout of "+ve+"ms exceeded":"timeout exceeded",We=C("timeoutErrorMessage");if(We)Se=We;return new ne(Se,w.clarifyTimeoutError?ne.ETIMEDOUT:ne.ECONNABORTED,f,me)}Le.once("abort",x);let Ke=()=>{if(re(),f.cancelToken)f.cancelToken.unsubscribe(Pe);if(f.signal)f.signal.removeEventListener("abort",Pe);Le.removeAllListeners()};if(f.cancelToken||f.signal){if(f.cancelToken&&f.cancelToken.subscribe(Pe),f.signal)f.signal.aborted?Pe():f.signal.addEventListener("abort",Pe)}z((ve,Se)=>{if(ye=!0,re(),Se){ke=!0,Ke();return}let{data:We}=ve;if(We instanceof yo.Readable||We instanceof yo.Duplex){let ir=yo.finished(We,()=>{ir(),Ke()})}else Ke()});let Pt=db(C("baseURL"),C("url"),C("allowAbsoluteUrls"),f),Ce=q?"http://localhost":Wt.hasBrowserEnv?Wt.origin:void 0,De=new URL(Pt,Ce),Ne=De.protocol||II[0];if(Ne==="data:"){if(le>-1){let Se=String(C("url")||Pt||"");if(Qte(Se)>le)return x(new ne("maxContentLength size of "+le+" exceeded",ne.ERR_BAD_RESPONSE,f))}let ve;if(W!=="GET")return La(y,x,{status:405,statusText:"method not allowed",headers:{},config:f});try{ve=wte(C("url"),P==="blob",{Blob:f.env&&f.env.Blob})}catch(Se){throw ne.from(Se,ne.ERR_BAD_REQUEST,f)}if(P==="text"){if(ve=ve.toString(F),!F||F==="utf8")ve=V.stripBOM(ve)}else if(P==="stream")ve=yo.Readable.from(ve);return La(y,x,{data:ve,status:200,statusText:"OK",headers:new lr,config:f})}if(II.indexOf(Ne)===-1)return x(new ne("Unsupported protocol "+Ne,ne.ERR_BAD_REQUEST,f));let Ge=lr.from(f.headers).normalize();Ge.set("User-Agent","axios/"+Nl,!1);let{onUploadProgress:st,onDownloadProgress:St}=f,Et=f.maxRate,je=void 0,Fe=void 0;if(V.isSpecCompliantForm(S)){let ve=Ge.getContentType(/boundary=([-_\w\d]{10,70})/i);S=Ote(S,(Se)=>{Ge.set(Se)},{tag:`axios-${Nl}-boundary`,boundary:ve&&ve[1]||void 0})}else if(V.isFormData(S)&&V.isFunction(S.getHeaders)&&S.getHeaders!==Object.prototype.getHeaders){if(mR(Ge,S.getHeaders(),C("formDataHeaderPolicy")),!Ge.hasContentLength())try{let ve=await ib.promisify(S.getLength).call(S);Number.isFinite(ve)&&ve>=0&&Ge.setContentLength(ve)}catch(ve){}}else if(V.isBlob(S)||V.isFile(S))S.size&&Ge.setContentType(S.type||"application/octet-stream"),Ge.setContentLength(S.size||0),S=yo.Readable.from(gR(S));else if(S&&!V.isStream(S)){if(Buffer.isBuffer(S));else if(V.isArrayBuffer(S))S=Buffer.from(new Uint8Array(S));else if(V.isString(S))S=Buffer.from(S,"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(Ge.setContentLength(S.length,!1),te>-1&&S.length>te)return x(new ne("Request body larger than maxBodyLength limit",ne.ERR_BAD_REQUEST,f))}let at=V.toFiniteNumber(Ge.getContentLength());if(V.isArray(Et))je=Et[0],Fe=Et[1];else je=Fe=Et;if(S&&(st||je)){if(!V.isStream(S))S=yo.Readable.from(S,{objectMode:!1});S=yo.pipeline([S,new nb({maxRate:V.toFiniteNumber(je)})],V.noop),st&&S.on("progress",AI(S,Lp(at,Na(Np(st,SI),!1,3))))}let ut=void 0,Bt=C("auth");if(Bt){let ve=V.getSafeProp(Bt,"username")||"",Se=V.getSafeProp(Bt,"password")||"";ut=ve+":"+Se}if(!ut&&(De.username||De.password)){let ve=RI(De.username),Se=RI(De.password);ut=ve+":"+Se}ut&&Ge.delete("authorization");let ct;try{ct=lb(De.pathname+De.search,C("params"),C("paramsSerializer")).replace(/^\?/,"")}catch(ve){return x(ne.from(ve,ne.ERR_BAD_REQUEST,f,null,null,{url:C("url"),exists:!0}))}if(Ge.set("Accept-Encoding",V.hasOwnProp(w,"advertiseZstdAcceptEncoding")&&w.advertiseZstdAcceptEncoding===!0?rre:RR,!1),He&&E)R=Object.assign(Object.create(null),R,{lookup:E});let Ue=Object.assign(Object.create(null),{path:ct,method:W,headers:cb(Ge),agents:{http:I,https:A},auth:ut,protocol:Ne,family:T,beforeRedirect:dre,beforeRedirects:Object.create(null),http2Options:R,createConnection:void 0});!V.isUndefined(E)&&(Ue.lookup=E);let et=!1;if(q){if(typeof q!=="string")return x(new ne("socketPath must be a string",ne.ERR_BAD_OPTION_VALUE,f));let ve=C("allowedSocketPaths");if(ve!=null){let Se=Array.isArray(ve)?ve:[ve],We=lI.resolve(q);if(!Se.some((bt)=>typeof bt==="string"&&lI.resolve(bt)===We))return x(new ne(`socketPath "${q}" is not permitted by allowedSocketPaths`,ne.ERR_BAD_OPTION_VALUE,f))}Ue.socketPath=q}else Ue.hostname=De.hostname.startsWith("[")?De.hostname.slice(1,-1):De.hostname,Ue.port=De.port,et=PR(Ue,j,Ne+"//"+De.hostname+(De.port?":"+De.port:"")+Ue.path,!1,A,I,!He);let Rt,ao=!1,rr=!1,$e=pb.test(Ue.protocol);if(Ue.agent==null)Ue.agent=$e?A:I;if(He){if(et)return x(new ne("HTTP/2 requests with a proxy are not supported",ne.ERR_NOT_SUPPORT,f));Rt=bre}else{let ve=C("transport");if(ve)Rt=ve;else if(ee===0)Rt=$e?HI:VI,ao=!0;else{if(rr=!0,Ue.sensitiveHeaders=[],ee)Ue.maxRedirects=ee;let Se=C("beforeRedirect");if(Se)Ue.beforeRedirects.config=Se;if(ut){let ir=De.origin,bt=ut;Ue.beforeRedirects.auth=function(Hr){try{if(new URL(Hr.href).origin===ir)Hr.auth=bt}catch(sr){}}}let We=C("sensitiveHeaders");if(We!=null){if(!V.isArray(We))return x(new ne("sensitiveHeaders must be an array of strings",ne.ERR_BAD_OPTION_VALUE,f));let ir=new Set;for(let bt of We){if(!V.isString(bt))return x(new ne("sensitiveHeaders must be an array of strings",ne.ERR_BAD_OPTION_VALUE,f));ir.add(bt.toLowerCase())}if(ir.size)Ue.sensitiveHeaders=Array.from(ir),Ue.beforeRedirects.sensitiveHeaders=function(Ir,Hr){if(!fre(Ir,Hr))pre(Ir.headers,ir)}}Rt=$e?nre:ore}}if(te>-1)Ue.maxBodyLength=te;else Ue.maxBodyLength=1/0;Ue.insecureHTTPParser=Boolean(C("insecureHTTPParser")),me=Rt.request(Ue,function(Se){if(re(),me.destroyed)return;let We=[Se],ir=V.toFiniteNumber(Se.headers["content-length"]);if(St||Fe){let sr=new nb({maxRate:V.toFiniteNumber(Fe)});St&&sr.on("progress",AI(sr,Lp(ir,Na(Np(St,SI),!0,3)))),We.push(sr)}let bt=Se,Ir=Se.req||me;if(he!==!1&&Se.headers["content-encoding"]){if(W==="HEAD"||Se.statusCode===204)delete Se.headers["content-encoding"];switch((Se.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":We.push(Bo.createUnzip(wI)),delete Se.headers["content-encoding"];break;case"deflate":We.push(new bR),We.push(Bo.createUnzip(wI)),delete Se.headers["content-encoding"];break;case"br":if(OR)We.push(Bo.createBrotliDecompress(ere)),delete Se.headers["content-encoding"];break;case"zstd":if(IR)We.push(Bo.createZstdDecompress(tre)),delete Se.headers["content-encoding"];break}}bt=We.length>1?yo.pipeline(We,V.noop):We[0];let Hr={status:Se.statusCode,statusText:Se.statusMessage,headers:new lr(Se.headers),config:f,request:Ir};if(P==="stream"){if(le>-1){let sr=le,fa=bt;async function*ns(){let ar=0;for await(let zd of fa){if(ar+=zd.length,ar>sr)throw new ne("maxContentLength size of "+sr+" exceeded",ne.ERR_BAD_RESPONSE,f,Ir);yield zd}}bt=yo.Readable.from(ns(),{objectMode:!1})}Hr.data=bt,La(y,x,Hr)}else{let sr=[],fa=0;bt.on("data",function(ar){if(sr.push(ar),fa+=ar.length,le>-1&&fa>le)ke=!0,bt.destroy(),Pe(new ne("maxContentLength size of "+le+" exceeded",ne.ERR_BAD_RESPONSE,f,Ir))}),bt.on("aborted",function(){if(ke)return;let ar=new ne("stream has been aborted",ne.ERR_BAD_RESPONSE,f,Ir,Hr);bt.destroy(ar),x(ar)}),bt.on("error",function(ar){if(ke)return;x(ne.from(ar,null,f,Ir,Hr))}),bt.on("end",function(){try{let ar=sr.length===1?sr[0]:Buffer.concat(sr);if(P!=="arraybuffer"){if(ar=ar.toString(F),!F||F==="utf8")ar=V.stripBOM(ar)}Hr.data=ar}catch(ar){return x(ne.from(ar,null,f,Hr.request,Hr))}La(y,x,Hr)})}Le.once("abort",(sr)=>{if(!bt.destroyed)bt.emit("error",sr),bt.destroy()})}),Le.once("abort",(ve)=>{if(me.close)me.close();else me.destroy(ve)}),me.on("error",function(Se){x(ne.from(Se,null,f,me))});let Kt=new Set;if(me.on("socket",function(Se){if(typeof Se.setKeepAlive==="function")Se.setKeepAlive(!0,60000);if(!Se[EI])Se.on("error",ire),Se[EI]=!0;Se[Ip]=me,Kt.add(Se)}),me.once("close",function(){re();for(let Se of Kt)if(Se[Ip]===me)Se[Ip]=null;Kt.clear()}),C("timeout")){let ve=parseInt(C("timeout"),10);if(Number.isNaN(ve)){Pe(new ne("error trying to parse `config.timeout` to int",ne.ERR_BAD_OPTION_VALUE,f,me));return}let Se=function(){if(ye)return;Pe(oe())};if(ao&&ve>0)Ae=setTimeout(Se,ve);me.setTimeout(ve,Se)}else me.setTimeout(0);if(V.isStream(S)){let ve=!1,Se=!1;S.on("end",()=>{ve=!0}),S.once("error",(ir)=>{Se=!0,me.destroy(ir)}),S.on("close",()=>{if(!ve&&!Se)Pe(new Ti("Request stream has been aborted",f,me))});let We=S;if(te>-1&&!rr){let ir=te,bt=0;We=yo.pipeline([S,new yo.Transform({transform(Ir,Hr,sr){if(bt+=Ir.length,bt>ir)return sr(new ne("Request body larger than maxBodyLength limit",ne.ERR_BAD_REQUEST,f,me));sr(null,Ir)}})],V.noop),We.on("error",(Ir)=>{if(!me.destroyed)me.destroy(Ir)})}We.pipe(me)}else S&&me.write(S),me.end()})},xre=Wt.hasStandardBrowserEnv?((o,f)=>(h)=>(h=new URL(h,Wt.origin),o.protocol===h.protocol&&o.host===h.host&&(f||o.port===h.port)))(new URL(Wt.origin),Wt.navigator&&/(msie|trident)/i.test(Wt.navigator.userAgent)):()=>!0,_re=Wt.hasStandardBrowserEnv?{write(o,f,h,y,x,z,C){if(typeof document>"u")return;let w=[`${o}=${encodeURIComponent(f)}`];if(V.isNumber(h))w.push(`expires=${new Date(h).toUTCString()}`);if(V.isString(y))w.push(`path=${y}`);if(V.isString(x))w.push(`domain=${x}`);if(z===!0)w.push("secure");if(V.isString(C))w.push(`SameSite=${C}`);document.cookie=w.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(z){return y.slice(x+1)}}return null},remove(o){this.write(o,"",Date.now()-86400000,"/")}}:{write(){},read(){return null},remove(){}},BI=(o)=>o instanceof lr?{...o}:o,zre=(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(T,k,O,R){if(V.isPlainObject(T)&&V.isPlainObject(k))return V.merge.call({caseless:R},T,k);else if(V.isPlainObject(k))return V.merge({},k);else if(V.isArray(k))return k.slice();return k}function x(T,k,O,R){if(!V.isUndefined(k))return y(T,k,O,R);else if(!V.isUndefined(T))return y(void 0,T,O,R)}function z(T,k){if(!V.isUndefined(k))return y(void 0,k)}function C(T,k){if(!V.isUndefined(k))return y(void 0,k);else if(!V.isUndefined(T))return y(void 0,T)}function w(T){let k=V.hasOwnProp(f,"transitional")?f.transitional:void 0;if(!V.isUndefined(k))if(V.isPlainObject(k)){if(V.hasOwnProp(k,T))return k[T]}else return;let O=V.hasOwnProp(o,"transitional")?o.transitional:void 0;if(V.isPlainObject(O)&&V.hasOwnProp(O,T))return O[T];return}function S(T,k,O){if(V.hasOwnProp(f,O))return y(T,k);else if(V.hasOwnProp(o,O))return y(void 0,T)}let E={url:z,method:z,data:z,baseURL:C,transformRequest:C,transformResponse:C,paramsSerializer:C,timeout:C,timeoutErrorMessage:C,withCredentials:C,withXSRFToken:C,adapter:C,responseType:C,xsrfCookieName:C,xsrfHeaderName:C,onUploadProgress:C,onDownloadProgress:C,decompress:C,maxContentLength:C,maxBodyLength:C,beforeRedirect:C,transport:C,httpAgent:C,httpsAgent:C,cancelToken:C,socketPath:C,allowedSocketPaths:C,responseEncoding:C,validateStatus:S,headers:(T,k,O)=>x(BI(T),BI(k),O,!0)};if(V.forEach(zre({...o,...f}),function(k){if(k==="__proto__"||k==="constructor"||k==="prototype")return;let O=V.hasOwnProp(E,k)?E[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!==S||(h[k]=A)}),V.hasOwnProp(f,"validateStatus")&&V.isUndefined(f.validateStatus)&&w("validateStatusUndefinedResolves")===!1)if(V.hasOwnProp(o,"validateStatus"))h.validateStatus=y(void 0,o.validateStatus);else delete h.validateStatus;return h}var Cre=(o)=>encodeURIComponent(o).replace(/%([0-9A-F]{2})/gi,(f,h)=>String.fromCharCode(parseInt(h,16)));function DR(o){let f=ws({},o),h=(O)=>V.hasOwnProp(f,O)?f[O]:void 0,y=h("data"),x=h("withXSRFToken"),z=h("xsrfHeaderName"),C=h("xsrfCookieName"),w=h("headers"),S=h("auth"),E=h("baseURL"),T=h("allowAbsoluteUrls"),k=h("url");if(f.headers=w=lr.from(w),f.url=lb(db(E,k,T,f),h("params"),h("paramsSerializer")),S){let O=V.getSafeProp(S,"username")||"",R=V.getSafeProp(S,"password")||"";try{w.set("Authorization","Basic "+btoa(O+":"+(R?Cre(R):"")))}catch(I){throw ne.from(I,ne.ERR_BAD_OPTION_VALUE,o)}}if(V.isFormData(y)){let O=V.getSafeProp(y,"getHeaders");if(Wt.hasStandardBrowserEnv||Wt.hasStandardBrowserWebWorkerEnv||V.isReactNative(y))w.setContentType(void 0);else if(V.isFunction(O))mR(w,O.call(y),h("formDataHeaderPolicy"))}if(Wt.hasStandardBrowserEnv){if(V.isFunction(x))x=x(f);if(x===!0||x==null&&xre(f.url)){let R=z&&C&&_re.read(C);if(R)w.set(z,R)}}return f}var wre=typeof XMLHttpRequest<"u",Sre=wre&&function(o){return new Promise(function(h,y){let x=DR(o),z=x.data,C=lr.from(x.headers).normalize(),{responseType:w,onUploadProgress:S,onDownloadProgress:E}=x,T,k,O,R,I,A;function j(){R&&R(),I&&I(),x.cancelToken&&x.cancelToken.unsubscribe(T),x.signal&&x.signal.removeEventListener("abort",T)}let P=new XMLHttpRequest;P.open(x.method.toUpperCase(),x.url,!0),P.timeout=x.timeout;function F(W){if(!P)return;if(P.status===0&&(kp(hR(x.url))||kp(Wt.origin))!=="file"&&!(P.responseURL&&P.responseURL.startsWith("file:"))){y(new ne("Request aborted",ne.ECONNABORTED,o,P)),j(),P=null;return}try{if(W)A&&A(W);else I&&I()}catch(he){setTimeout(()=>{throw he})}if(!P)return;let ee=lr.from("getAllResponseHeaders"in P&&P.getAllResponseHeaders()),le={data:!w||w==="text"||w==="json"?P.responseText:P.response,status:P.status,statusText:P.statusText,headers:ee,config:o,request:P};La(function(ye){h(ye),j()},function(ye){y(ye),j()},le),P=null}if("onloadend"in P)P.onloadend=F;else P.onreadystatechange=function(){if(!P||P.readyState!==4)return;if(P.status===0&&!(P.responseURL&&P.responseURL.startsWith("file:")))return;setTimeout(F)};if(P.onabort=function(){if(!P)return;y(new ne("Request aborted",ne.ECONNABORTED,o,P)),j(),P=null},P.onerror=function(ee){let te=ee&&ee.message?ee.message:"Network Error",le=new ne(te,ne.ERR_NETWORK,o,P);le.event=ee||null,y(le),j(),P=null},P.ontimeout=function(){let ee=x.timeout?"timeout of "+x.timeout+"ms exceeded":"timeout exceeded",te=x.transitional||Up;if(x.timeoutErrorMessage)ee=x.timeoutErrorMessage;y(new ne(ee,te.clarifyTimeoutError?ne.ETIMEDOUT:ne.ECONNABORTED,o,P)),j(),P=null},z===void 0&&C.setContentType(null),"setRequestHeader"in P)V.forEach(cb(C),function(ee,te){P.setRequestHeader(te,ee)});if(!V.isUndefined(x.withCredentials))P.withCredentials=!!x.withCredentials;if(w&&w!=="json")P.responseType=x.responseType;if(E)[O,I,A]=Na(E,!0),P.addEventListener("progress",O);if(S&&P.upload)[k,R]=Na(S),P.upload.addEventListener("progress",k),P.upload.addEventListener("loadend",R);if(x.cancelToken||x.signal){if(T=(W)=>{if(!P)return;y(!W||W.type?new Ti(null,o,P):W),P.abort(),j(),P=null},x.cancelToken&&x.cancelToken.subscribe(T),x.signal)x.signal.aborted?T():x.signal.addEventListener("abort",T)}let q=kp(x.url);if(q&&!Wt.protocols.includes(q)){y(new ne("Unsupported protocol "+q+":",ne.ERR_BAD_REQUEST,o)),j();return}P.send(z||null)})},Ere=(o,f)=>{if(o=o?o.filter(Boolean):[],!f&&!o.length)return;let h=new AbortController,y=!1,x=function(S){if(!y){y=!0,C();let E=S instanceof Error?S:this.reason;h.abort(E instanceof ne?E:new Ti(E instanceof Error?E.message:E))}},z=f&&setTimeout(()=>{z=null,x(new ne(`timeout of ${f}ms exceeded`,ne.ETIMEDOUT))},f),C=()=>{if(!o)return;z&&clearTimeout(z),z=null,o.forEach((S)=>{S.unsubscribe?S.unsubscribe(x):S.removeEventListener("abort",x)}),o=null};o.forEach((S)=>{if(y)return;if(S.aborted){x.call(S);return}S.addEventListener("abort",x,{once:!0})});let{signal:w}=h;return w.unsubscribe=()=>V.asap(C),w},Tre=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},kre=async function*(o,f){for await(let h of Ore(o))yield*Tre(h,f)},Ore=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()}},LI=(o,f,h,y)=>{let x=kre(o,f),z=0,C,w=(S)=>{if(!C)C=!0,y&&y(S)};return new ReadableStream({async pull(S){try{let{done:E,value:T}=await x.next();if(E){w(),S.close();return}let k=T.byteLength;if(h){let O=z+=k;h(O)}S.enqueue(new Uint8Array(T))}catch(E){throw w(E),E}},cancel(S){return w(S),x.return()}},{highWaterMark:2})},NI=65536,Ire={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:zp}=V,Rre=(o)=>encodeURIComponent(o).replace(/%([0-9A-F]{2})/gi,(f,h)=>String.fromCharCode(parseInt(h,16))),jI=(o)=>{if(!V.isString(o))return o;try{return decodeURIComponent(o)}catch(f){return o}},MI=(o,...f)=>{try{return!!o(...f)}catch(h){return!1}},Are=(o)=>{let f=o.indexOf("://"),h=o;if(f!==-1)h=h.slice(f+3);return h.includes("@")||h.includes(":")},Pre=(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:z,Response:C}=o,w=x?zp(x):typeof fetch==="function",S=zp(z),E=zp(C);if(!w)return!1;let T=w&&zp(h),k=w&&(typeof y==="function"?((P)=>(F)=>P.encode(F))(new y):async(P)=>new Uint8Array(await new z(P).arrayBuffer())),O=S&&T&&MI(()=>{let P=!1,F=new z(Wt.origin,{body:new h,method:"POST",get duplex(){return P=!0,"half"}}),q=F.headers.has("Content-Type");if(F.body!=null)F.body.cancel();return P&&!q}),R=E&&T&&MI(()=>V.isReadableStream(new C("").body)),I={stream:R&&((P)=>P.body)};w&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((P)=>{!I[P]&&(I[P]=(F,q)=>{let W=F&&F[P];if(W)return W.call(F);throw new ne(`Response type '${P}' is not supported`,ne.ERR_NOT_SUPPORT,q)})})})();let A=async(P)=>{if(P==null)return 0;if(V.isBlob(P))return P.size;if(V.isSpecCompliantForm(P))return(await new z(Wt.origin,{method:"POST",body:P}).arrayBuffer()).byteLength;if(V.isArrayBufferView(P)||V.isArrayBuffer(P))return P.byteLength;if(V.isURLSearchParams(P))P=P+"";if(V.isString(P))return(await k(P)).byteLength},j=async(P,F)=>{let q=V.toFiniteNumber(P.getContentLength());return q==null?A(F):q};return async(P)=>{let{url:F,method:q,data:W,signal:ee,cancelToken:te,timeout:le,onDownloadProgress:he,onUploadProgress:ye,responseType:ke,headers:me,withCredentials:Ae="same-origin",fetchOptions:He,maxContentLength:Le,maxBodyLength:Pe,maxRedirects:re}=DR(P),oe=V.isNumber(Le)&&Le>-1,Ke=V.isNumber(Pe)&&Pe>-1,Pt=(je)=>V.hasOwnProp(P,je)?P[je]:void 0,Ce=x||fetch;ke=ke?(ke+"").toLowerCase():"text";let De=Ere([ee,te&&te.toAbortSignal()],le),Ne=null,Ge=De&&De.unsubscribe&&(()=>{De.unsubscribe()}),st,St=null,Et=()=>new ne("Request body larger than maxBodyLength limit",ne.ERR_BAD_REQUEST,P,Ne);try{let je=void 0,Fe=Pt("auth");if(Fe){let $e=V.getSafeProp(Fe,"username")||"",Kt=V.getSafeProp(Fe,"password")||"";je={username:$e,password:Kt}}if(Are(F)){let $e=new URL(F,Wt.origin);if(!je&&($e.username||$e.password)){let Kt=jI($e.username),ve=jI($e.password);je={username:Kt,password:ve}}if($e.username||$e.password)$e.username="",$e.password="",F=$e.href}if(je)me.delete("authorization"),me.set("Authorization","Basic "+btoa(Rre((je.username||"")+":"+(je.password||""))));if(oe&&typeof F==="string"&&F.startsWith("data:")){if(Xte(F)>Le)throw new ne("maxContentLength size of "+Le+" exceeded",ne.ERR_BAD_RESPONSE,P,Ne)}if(Ke&&q!=="get"&&q!=="head"){let $e=await A(W);if(typeof $e==="number"&&isFinite($e)){if(st=$e,$e>Pe)throw Et()}}let at=Ke&&(V.isReadableStream(W)||V.isStream(W)),ut=($e,Kt,ve)=>LI($e,NI,(Se)=>{if(Ke&&Se>Pe)throw St=Et();Kt&&Kt(Se)},ve);if(O&&q!=="get"&&q!=="head"&&(ye||at)){if(st=st==null?await j(me,W):st,st!==0||at){let $e=new z(F,{method:"POST",body:W,duplex:"half"}),Kt;if(V.isFormData(W)&&(Kt=$e.headers.get("content-type")))me.setContentType(Kt);if($e.body){let[ve,Se]=ye&&Lp(st,Na(Np(ye)))||[];W=ut($e.body,ve,Se)}}}else if(at&&!S&&T&&q!=="get"&&q!=="head")W=ut(W);else if(at&&S&&!O&&q!=="get"&&q!=="head")throw new ne("Stream request bodies are not supported by the current fetch implementation",ne.ERR_NOT_SUPPORT,P,Ne);if(!V.isString(Ae))Ae=Ae?"include":"omit";let Bt=S&&"credentials"in z.prototype;if(V.isFormData(W)){let $e=me.getContentType();if($e&&/^multipart\/form-data/i.test($e)&&!/boundary=/i.test($e))me.delete("content-type")}me.set("User-Agent","axios/"+Nl,!1);let ct=He==null?He:Object.assign(Object.create(null),He);if(ct)delete ct.body,delete ct.headers,delete ct.method,delete ct.signal,delete ct.duplex,delete ct.credentials;let Ue=Object.assign(Object.create(null),ct,{signal:De,method:q.toUpperCase(),headers:cb(me.normalize()),body:W,duplex:"half",credentials:Bt?Ae:void 0});if(S){if(V.forEach(Ire,($e,Kt)=>{if(Ue[Kt]===void 0)Ue[Kt]=$e}),Ue.signal===void 0)Ue.signal=null;if(Ue.body===void 0)Ue.body=null}if(re===0){if(Ue.redirect="manual",ct)ct.redirect="manual"}Ne=S&&new z(F,Ue);let et=await(S?Ce(Ne,ct):Ce(F,Ue)),Rt=lr.from(et.headers);if(oe){let $e=V.toFiniteNumber(Rt.getContentLength());if($e!=null&&$e>Le)throw new ne("maxContentLength size of "+Le+" exceeded",ne.ERR_BAD_RESPONSE,P,Ne)}let ao=R&&(ke==="stream"||ke==="response");if(R&&et.body&&(he||oe||ao&&Ge)){let $e={};["status","statusText","headers"].forEach((bt)=>{$e[bt]=et[bt]});let Kt=V.toFiniteNumber(Rt.getContentLength()),[ve,Se]=he&&Lp(Kt,Na(Np(he),!0))||[],We=0,ir=(bt)=>{if(oe){if(We=bt,We>Le)throw new ne("maxContentLength size of "+Le+" exceeded",ne.ERR_BAD_RESPONSE,P,Ne)}ve&&ve(bt)};et=new C(LI(et.body,NI,ir,()=>{Se&&Se(),Ge&&Ge()}),$e)}ke=ke||"text";let rr=await I[V.findKey(I,ke)||"text"](et,P);if(oe&&!R&&!ao){let $e;if(rr!=null){if(typeof rr.byteLength==="number")$e=rr.byteLength;else if(typeof rr.size==="number")$e=rr.size;else if(typeof rr==="string")$e=typeof y==="function"?new y().encode(rr).byteLength:rr.length}if(typeof $e==="number"&&$e>Le)throw new ne("maxContentLength size of "+Le+" exceeded",ne.ERR_BAD_RESPONSE,P,Ne)}return!ao&&Ge&&Ge(),await new Promise(($e,Kt)=>{La($e,Kt,{data:rr,headers:lr.from(et.headers),status:et.status,statusText:et.statusText,config:P,request:Ne})})}catch(je){if(Ge&&Ge(),De&&De.aborted&&De.reason instanceof ne){let Fe=De.reason;if(Fe.config=P,Ne&&(Fe.request=Ne),je!==Fe)Object.defineProperty(Fe,"cause",{__proto__:null,value:je,writable:!0,enumerable:!1,configurable:!0});throw Fe}if(St)throw Ne&&!St.request&&(St.request=Ne),St;if(je instanceof ne)throw Ne&&!je.request&&(je.request=Ne),je;if(je&&je.name==="TypeError"&&/Load failed|fetch/i.test(je.message)){let Fe=new ne("Network Error",ne.ERR_NETWORK,P,Ne,je&&je.response);throw Object.defineProperty(Fe,"cause",{__proto__:null,value:je.cause||je,writable:!0,enumerable:!1,configurable:!0}),Fe}throw ne.from(je,je&&je.code,P,Ne,je&&je.response)}}},Dre=new Map,BR=(o)=>{let f=o&&o.env||{},{fetch:h,Request:y,Response:x}=f,z=[y,x,h],C=z.length,w=C,S,E,T=Dre;while(w--)S=z[w],E=T.get(S),E===void 0&&T.set(S,E=w?new Map:Pre(f)),T=E;return E};BR();var fb={http:vre,xhr:Sre,fetch:{get:BR}};V.forEach(fb,(o,f)=>{if(o){try{Object.defineProperty(o,"name",{__proto__:null,value:f})}catch(h){}Object.defineProperty(o,"adapterName",{__proto__:null,value:f})}});var qI=(o)=>`- ${o}`,Bre=(o)=>V.isFunction(o)||o===null||o===!1;function Lre(o,f){o=V.isArray(o)?o:[o];let{length:h}=o,y,x,z={};for(let C=0;C<h;C++){y=o[C];let w;if(x=y,!Bre(y)){if(x=fb[(w=String(y)).toLowerCase()],x===void 0)throw new ne(`Unknown adapter '${w}'`)}if(x&&(V.isFunction(x)||(x=x.get(f))))break;z[w||"#"+C]=x}if(!x){let C=Object.entries(z).map(([S,E])=>`adapter ${S} `+(E===!1?"is not supported by the environment":"is not available in the build")),w=h?C.length>1?`since :
84
+ `+C.map(qI).join(`
85
+ `):" "+qI(C[0]):"as no adapter specified";throw new ne("There is no suitable adapter to dispatch the request "+w,ne.ERR_NOT_SUPPORT)}return x}var LR={getAdapter:Lre,adapters:fb};function Yy(o){if(o.cancelToken)o.cancelToken.throwIfRequested();if(o.signal&&o.signal.aborted)throw new Ti(null,o)}function Xy(o){let f=V.toSafeFlatObject(o);if(Yy(f),f.headers=lr.from(V.getSafeProp(f,"headers")),f.data=Ky.call(f,f.transformRequest),["post","put","patch"].indexOf(f.method)!==-1)f.headers.setContentType("application/x-www-form-urlencoded",!1);return LR.getAdapter(f.adapter||Fl.adapter,f)(f).then(function(x){Yy(f),f.response=x;try{x.data=Ky.call(f,f.transformResponse,x)}finally{delete f.response}return x.headers=lr.from(x.headers),x},function(x){if(!fR(x)){if(Yy(f),x&&x.response){f.response=x.response;try{x.response.data=Ky.call(f,f.transformResponse,x.response)}finally{delete f.response}x.response.headers=lr.from(x.response.headers)}}return Promise.reject(x)})}var Vp={};["object","boolean","number","function","string","symbol"].forEach((o,f)=>{Vp[o]=function(y){return typeof y===o||"a"+(f<1?"n ":" ")+o}});var FI={};Vp.transitional=function(f,h,y){function x(z,C){return"[Axios v"+Nl+"] Transitional option '"+z+"'"+C+(y?". "+y:"")}return(z,C,w)=>{if(f===!1)throw new ne(x(C," has been removed"+(h?" in "+h:"")),ne.ERR_DEPRECATED);if(h&&!FI[C])FI[C]=!0,console.warn(x(C," has been deprecated since v"+h+" and will be removed in the near future"));return f?f(z,C,w):!0}};Vp.spelling=function(f){return(h,y)=>(console.warn(`${y} is likely a misspelling of ${f}`),!0)};function Nre(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 z=y[x],C=Object.prototype.hasOwnProperty.call(f,z)?f[z]:void 0;if(C){let w=o[z],S=w===void 0||C(w,z,o);if(S!==!0)throw new ne("option "+z+" must be "+S,ne.ERR_BAD_OPTION_VALUE);continue}if(h!==!0)throw new ne("Unknown option "+z,ne.ERR_BAD_OPTION)}}var Pp={assertOptions:Nre,validators:Vp},Gr=Pp.validators;class Si{constructor(o){this.defaults=o||{},this.interceptors={request:new tb,response:new tb}}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,z="";if(typeof x==="string"){let C=x.indexOf(`
86
+ `);z=C===-1?"":x.slice(C+1)}if(!h.stack)h.stack=z;else if(z){let C=z.indexOf(`
87
+ `),w=C===-1?-1:z.indexOf(`
88
+ `,C+1),S=w===-1?"":z.slice(w+1);if(!String(h.stack).endsWith(S))h.stack+=`
89
+ `+z}}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)Pp.assertOptions(h,{silentJSONParsing:Gr.transitional(Gr.boolean),forcedJSONParsing:Gr.transitional(Gr.boolean),clarifyTimeoutError:Gr.transitional(Gr.boolean),legacyInterceptorReqResOrdering:Gr.transitional(Gr.boolean),advertiseZstdAcceptEncoding:Gr.transitional(Gr.boolean),validateStatusUndefinedResolves:Gr.transitional(Gr.boolean)},!1);if(y!=null)if(V.isFunction(y))f.paramsSerializer={serialize:y};else Pp.assertOptions(y,{encode:Gr.function,serialize:Gr.function},!0);if(f.allowAbsoluteUrls!==void 0);else if(this.defaults.allowAbsoluteUrls!==void 0)f.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls;else f.allowAbsoluteUrls=!0;Pp.assertOptions(f,{baseUrl:Gr.spelling("baseURL"),withXsrfToken:Gr.spelling("withXSRFToken")},!0),f.method=(V.getSafeProp(f,"method")||V.getSafeProp(this.defaults,"method")||"get").toLowerCase();let z=x&&V.merge(x.common,x[f.method]);x&&V.forEach(pR.concat("common"),(R)=>{delete x[R]}),f.headers=lr.concat(z,x);let C=[],w=!0;this.interceptors.request.forEach(function(I){if(typeof I.runWhen==="function"&&I.runWhen(f)===!1)return;w=w&&I.synchronous;let A=f.transitional||Up;if(A&&A.legacyInterceptorReqResOrdering)C.unshift(I.fulfilled,I.rejected);else C.push(I.fulfilled,I.rejected)});let S=[];this.interceptors.response.forEach(function(I){S.push(I.fulfilled,I.rejected)});let E,T=0,k;if(!w){let R=[Xy.bind(this),void 0];R.unshift(...C),R.push(...S),k=R.length,E=Promise.resolve(f);while(T<k)E=E.then(R[T++],R[T++]);return E}k=C.length;let O=f;while(T<k){let R=C[T++],I=C[T++];try{O=R?R(O):O}catch(A){if(!I){E=Promise.reject(A);break}try{let j=I.call(this,A);if(V.isThenable(j))E=Promise.resolve(j).then(()=>Xy.call(this,O))}catch(j){E=Promise.reject(j)}break}}if(!E)try{E=Xy.call(this,O)}catch(R){E=Promise.reject(R)}T=0,k=S.length;while(T<k)E=E.then(S[T++],S[T++]);return E}getUri(o){o=ws(this.defaults,o);let f=db(o.baseURL,o.url,o.allowAbsoluteUrls,o);return lb(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,w){return this.request(ws(w||{},{method:f,headers:y?{"Content-Type":"multipart/form-data"}:{},url:z,data:C}))}}if(Si.prototype[f]=h(),f!=="query")Si.prototype[f+"Form"]=h(!0)});class hb{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,z=new Promise((C)=>{h.subscribe(C),x=C}).then(y);return z.cancel=function(){h.unsubscribe(x)},z},o(function(x,z,C){if(h.reason)return;h.reason=new Ti(x,z,C),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 hb(function(y){o=y}),cancel:o}}}function jre(o){return function(h){return o.apply(null,h)}}function Mre(o){return V.isObject(o)&&o.isAxiosError===!0}var Dp={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(Dp).forEach(([o,f])=>{if(Dp[f]===void 0)Dp[f]=o});function NR(o){let f=new Si(o),h=KI(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 NR(ws(o,x))},h}var ur=NR(Fl);ur.Axios=Si;ur.CanceledError=Ti;ur.CancelToken=hb;ur.isCancel=fR;ur.VERSION=Nl;ur.toFormData=qp;ur.AxiosError=ne;ur.Cancel=ur.CanceledError;ur.all=function(f){return Promise.all(f)};ur.spread=jre;ur.isAxiosError=Mre;ur.mergeConfig=ws;ur.AxiosHeaders=lr;ur.formToJSON=(o)=>dR(V.isHTMLForm(o)?new FormData(o):o);ur.getAdapter=LR.getAdapter;ur.HttpStatusCode=Dp;ur.default=ur;jR.exports=ur});var MR=i(function(qa){var qre=qa&&qa.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(qa,"__esModule",{value:!0});qa.isValidUrl=Ure;qa.checkUrlExists=$re;var Fre=qre(Ss());function Ure(o){try{return new URL(o),!0}catch{return!1}}async function $re(o){return Fre.default.request({url:o,method:"HEAD"}).then((f)=>f.status)}});var se=i(function(Yt){var Vre=Yt&&Yt.__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]}),Ar=Yt&&Yt.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))Vre(f,o,h)};Object.defineProperty(Yt,"__esModule",{value:!0});Ar(Td(),Yt);Ar(l1(),Yt);Ar(nT(),Yt);Ar(uT(),Yt);Ar(mT(),Yt);Ar(bT(),Yt);Ar(ml(),Yt);Ar(cp(),Yt);Ar(wT(),Yt);Ar(ET(),Yt);Ar(kT(),Yt);Ar(AT(),Yt);Ar(ng(),Yt);Ar(DT(),Yt);Ar(LT(),Yt);Ar(MT(),Yt);Ar(MR(),Yt)});var Hp=i(function(FR){Object.defineProperty(FR,"__esModule",{value:!0});FR.timeout=Jre;var Gre=se(),Kre=1e4,Wre=Gre.createLogger({package:"resilience",messageContext:"timeout"});function Jre(o=Kre){if(o<=0)throw Error("Timeout must be greater than 0.");if(o<10)Wre.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)=>Yre(f.fn(y),o,h)}}function Zre(o,f){let h;return[new Promise((x,z)=>{h=setTimeout(()=>z(Error(f)),o)}),h]}async function Yre(o,f,h){let[y,x]=Zre(f,h),z=o.finally(()=>{clearTimeout(x)});return Promise.race([z,y])}});var $R=i(function(f2e,UR){function No(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)}UR.exports=No;No.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};No.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);if(this._timer)clearTimeout(this._timer);this._timeouts=[],this._cachedTimeouts=null};No.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};No.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)};No.prototype.try=function(o){console.log("Using RetryOperation.try() is deprecated"),this.attempt(o)};No.prototype.start=function(o){console.log("Using RetryOperation.start() is deprecated"),this.attempt(o)};No.prototype.start=No.prototype.try;No.prototype.errors=function(){return this._errors};No.prototype.attempts=function(){return this._attempts};No.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],z=x.message,C=(o[z]||0)+1;if(o[z]=C,C>=h)f=x,h=C}return f}});var HR=i(function(mb){var Qre=$R();mb.operation=function(o){var f=mb.timeouts(o);return new Qre(f,{forever:o&&(o.forever||o.retries===1/0),unref:o&&o.unref,maxRetryTime:o&&o.maxRetryTime})};mb.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,C){return z-C}),y};mb.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};mb.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 z=h[x],C=o[z];o[z]=function(S){var E=mb.operation(f),T=Array.prototype.slice.call(arguments,1),k=T.pop();T.push(function(O){if(E.retry(O))return;if(O)arguments[0]=E.mainError();k.apply(this,arguments)}),E.attempt(function(){S.apply(o,T)})}.bind(o,C),o[z].options=f}}});var gb=i(function(m2e,GR){var ooe=HR();function noe(o,f){function h(y,x){var z=f||{},C;if(!("randomize"in z))z.randomize=!0;C=ooe.operation(z);function w(T){x(T||Error("Aborted"))}function S(T,k){if(T.bail){w(T);return}if(!C.retry(T))x(C.mainError());else if(z.onRetry)z.onRetry(T,k)}function E(T){var k;try{k=o(w,T)}catch(O){S(O,T);return}Promise.resolve(k).then(y).catch(function(R){S(R,T)})}C.attempt(E)}return new Promise(h)}GR.exports=noe});var Gp=i(function(Xn){var ioe=Xn&&Xn.__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]}),soe=Xn&&Xn.__setModuleDefault||(Object.create?function(o,f){Object.defineProperty(o,"default",{enumerable:!0,value:f})}:function(o,f){o.default=f}),aoe=Xn&&Xn.__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")ioe(h,f,y[x])}return soe(h,f),h}}();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.retry=poe;var KR=se(),coe=aoe(gb()),loe=Ss(),uoe=KR.createLogger({package:"resilience",messageContext:"retry"}),doe=3;function poe(o=doe){if(o<0)throw Error("Number of retries must be greater or equal to 0.");return function(f){return(h)=>coe.default(async(y)=>{try{return await f.fn(h)}catch(x){let z=loe.isAxiosError(x)?x.response?.status:void 0;if(!z)uoe.debug("HTTP request failed but error did not contain a response status field as expected. Rethrowing error.");else if(z.toString().startsWith("4")){y(new KR.ErrorWithCause(`Request failed with status code ${z}`,x));return}throw x}},{retries:o})}}});var JR=i(function(WR){Object.defineProperty(WR,"__esModule",{value:!0});WR.executeWithMiddleware=foe;function foe(o,{fn:f,context:h,fnArgument:y}){if(!o?.length)return f(y);return hoe(o,{context:h,fn:f})(y)}function hoe(o,f){let{context:h}=f;return o.reduceRight((x,z)=>({fn:z(x),context:h}),f).fn}});var eA=i(function(XR,QR){var kn=Symbol("window"),Kp=Symbol("buckets"),ZR=Symbol("timeout"),yb=Symbol("percentiles"),Jp=Symbol("bucket-interval"),Zp=Symbol("snapshot-interval"),Yp=Symbol("rotate-event-name"),goe=c("events").EventEmitter;class YR extends goe{constructor(o){super();this[Kp]=o.rollingCountBuckets||10,this[ZR]=o.rollingCountTimeout||1e4,this[kn]=Array(this[Kp]),this[yb]=[0,0.25,0.5,0.75,0.9,0.95,0.99,0.995,1],this[Yp]="rotate",this.rollingPercentilesEnabled=o.rollingPercentilesEnabled!==!1,this.enableSnapshots=o.enableSnapshots!==!1,this.rotateBucketController=o.rotateBucketController,this.rotateBucket=yoe(this[kn]);for(let h=0;h<this[Kp];h++)this[kn][h]=Xp();let f=Math.floor(this[ZR]/this[Kp]);if(this.rotateBucketController)this.startListeneningForRotateEvent();else if(this[Jp]=setInterval(this.rotateBucket,f),typeof this[Jp].unref==="function")this[Jp].unref();if(this.enableSnapshots){if(this[Zp]=setInterval((h)=>this.emit("snapshot",this.stats),f),typeof this[Zp].unref==="function")this[Zp].unref()}if(o.stats)this[kn][0]={...Xp(),...o.stats}}get stats(){let o=this[kn].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},Xp());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[yb].forEach((f)=>{o.percentiles[f]=boe(f,o.latencyTimes)})}else o.latencyMean=-1,this[yb].forEach((f)=>{o.percentiles[f]=-1});return o}get window(){return this[kn].slice()}increment(o,f){if(this[kn][0][o]++,o==="successes"||o==="failures"||o==="timeouts")this[kn][0].latencyTimes.push(f||0)}open(){this[kn][0].isCircuitBreakerOpen=!0}close(){this[kn][0].isCircuitBreakerOpen=!1}shutdown(){if(this.removeAllListeners(),this.rotateBucketController===void 0)clearInterval(this[Jp]);else this.removeRotateBucketControllerListener();if(this.enableSnapshots)clearInterval(this[Zp])}removeRotateBucketControllerListener(){if(this.rotateBucketController)this.rotateBucketController.removeListener(this[Yp],this.rotateBucket)}startListeneningForRotateEvent(){if(this.rotateBucketController&&this.rotateBucketController.listenerCount(this[Yp],this.rotateBucket)===0)this.rotateBucketController.on(this[Yp],this.rotateBucket)}}var yoe=(o)=>(f)=>{o.pop(),o.unshift(Xp())},Xp=(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 boe(o,f){if(o===0)return f[0]||0;let h=Math.ceil(o*f.length);return f[h-1]||0}QR.exports=XR=YR});var oA=i(function(tA,rA){rA.exports=tA=voe;function voe(o){let f=[],h=o,y={take:x,release:z,test:C};return Object.defineProperty(y,"count",{get:(w)=>h,enumerable:!0}),y;function x(w){if(h>0)return--h,Promise.resolve(z);return new Promise((S,E)=>{if(f.push((T)=>{--h,S(z)}),w)setTimeout((T)=>{f.shift();let k=Error(`Timed out after ${w}ms`);k.code="ETIMEDOUT",E(k)},w)})}function z(){if(h++,f.length>0)f.shift()()}function C(){if(h<1)return!1;return x()&&!0}}});var aA=i(function(iA,sA){class nA{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()}}sA.exports=iA=nA});var gA=i(function(hA,mA){var xoe=c("events"),Qp=eA(),_oe=oA(),cA=aA(),Eo=Symbol("state"),Ul=Symbol("open"),Es=Symbol("closed"),Fa=Symbol("half-open"),Ts=Symbol("pending-close"),$l=Symbol("shutdown"),Gl=Symbol("fallback"),ki=Symbol("status"),bb=Symbol("name"),lA=Symbol("group"),Ua=Symbol("Enabled"),$a=Symbol("warming-up"),uA=Symbol("volume-threshold"),pA=Symbol("our-error"),Vl=Symbol("reset-timeout"),vb=Symbol("warmup-timeout"),dA=Symbol("last-timer-at");class xb extends xoe{static isOurError(o){return!!o[pA]}static newStatus(o){return new Qp(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||((z)=>!1),this.options.cacheTTL=f.cacheTTL??0,this.options.cacheGetKey=f.cacheGetKey??((...z)=>JSON.stringify(z)),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((z)=>["error","success","timeout"].includes(z))||[],this.options.cache){if(this.options.cacheTransport===void 0)this.options.cacheTransport=new cA(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 cA(f.coalesceSize);if(this.semaphore=new _oe(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[uA]=Number.isInteger(f.volumeThreshold)?f.volumeThreshold:0,this[$a]=f.allowWarmUp===!0,this.options.status)if(this.options.status instanceof Qp)this[ki]=this.options.status;else this[ki]=new Qp({stats:this.options.status});else this[ki]=new Qp(this.options);if(this[Eo]=Es,f.state)this[Ua]=f.state.enabled!==!1,this[$a]=f.state.warmUp||this[$a],this[Es]=f.state.closed!==!1,this[Fa]=this[Ts]=f.state.halfOpen||!1,this[Ul]=!this[Es]&&!this[Fa],this[$l]=f.state.shutdown||!1;else this[Ts]=!1,this[Ua]=f.enabled!==!1;if(this[Gl]=null,this[bb]=f.name||o.name||Coe(),this[lA]=f.group||this[bb],this[$a]){let z=this[vb]=setTimeout((C)=>this[$a]=!1,this.options.rollingCountTimeout);if(typeof z.unref==="function")z.unref()}if(typeof o!=="function")this.action=(z)=>Promise.resolve(o);else this.action=o;if(f.maxFailures)console.error("options.maxFailures is deprecated. Please use options.errorThresholdPercentage");let h=(z)=>(C,w)=>this[ki].increment(z,w);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",(z)=>this[ki].open()),this.on("close",(z)=>this[ki].close()),this.on("semaphoreLocked",h("semaphoreRejections"));function y(z){return z[dA]=Date.now(),(C)=>{let w=z[Vl]=setTimeout(()=>{x(z)},z.options.resetTimeout);if(typeof w.unref==="function")w.unref()}}function x(z){z[Eo]=Fa,z[Ts]=!0,z._renewAbortControllerIfNeeded(),z.emit("halfOpen",z.options.resetTimeout)}if(this.on("open",y(this)),this.on("success",(z)=>{if(this.halfOpen)this.close()}),this[$l])this[Eo]=$l,this.shutdown();else if(this[Es])this.close();else if(this[Ul])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]!==Es){if(this[Vl])clearTimeout(this[Vl]);this[Eo]=Es,this[Ts]=!1,this._renewAbortControllerIfNeeded(),this.emit("close")}}open(){if(this[Eo]!==Ul)this[Eo]=Ul,this[Ts]=!1,this.emit("open")}shutdown(){if(this.emit("shutdown"),this.disable(),this.removeAllListeners(),this[Vl])clearTimeout(this[Vl]);if(this[vb])clearTimeout(this[vb]);this.status.shutdown(),this[Eo]=$l,this.clearCache()}get isShutdown(){return this[Eo]===$l}get name(){return this[bb]}get group(){return this[lA]}get pendingClose(){return this[Ts]}get closed(){return this[Eo]===Es}get opened(){return this[Eo]===Ul}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[dA]},status:this.status.stats}}get enabled(){return this[Ua]}get warmUp(){return this[$a]}get volumeThreshold(){return this[uA]}fallback(o){let f=o;if(o instanceof xb)f=(...h)=>o.fire(...h);return this[Gl]=f,this}fire(...o){return this.call(this.action,...o)}call(o,...f){if(this.isShutdown){let w=tf("The circuit has been shutdown.","ESHUTDOWN");return Promise.reject(w)}let h=f.slice();if(this.emit("fire",h),!this[Ua]){let w=this.action.apply(o,h);return typeof w.then==="function"?w:Promise.resolve(w)}let y=this.options.cache||this.options.coalesce?this.options.cacheGetKey.apply(this,f):"";if(this.options.cache){let w=this.options.cacheTransport.get(y);if(w)return this.emit("cacheHit"),w;this.emit("cacheMiss")}if(this.options.coalesce){let w=this.options.coalesceCache.get(y);if(w)return this.emit("coalesceCacheHit"),w;this.emit("coalesceCacheMiss")}if(!this.closed&&!this.pendingClose){let w=tf("Breaker is open","EOPENBREAKER");return this.emit("reject",w),fA(this,w,h)||Promise.reject(w)}this[Ts]=!1;let x,z=!1,C=new Promise((w,S)=>{let E=Date.now();if(this.semaphore.test()){if(this.options.timeout)x=setTimeout(()=>{z=!0;let T=tf(`Timed out after ${this.options.timeout}ms`,"ETIMEDOUT"),k=Date.now()-E;if(this.semaphore.release(),this.emit("timeout",T,k,h),ef(T,this,x,h,k,w,S),Hl(this,y,"timeout"),this.options.abortController)this.options.abortController.abort()},this.options.timeout);try{let T=this.action.apply(o,h),k=typeof T.then==="function"?T:Promise.resolve(T);k.then((O)=>{if(!z){if(clearTimeout(x),this.emit("success",O,Date.now()-E),Hl(this,y,"success"),this.semaphore.release(),w(O),this.options.cache)this.options.cacheTransport.set(y,k,this.options.cacheTTL>0?Date.now()+this.options.cacheTTL:0)}}).catch((O)=>{if(!z){this.semaphore.release();let R=Date.now()-E;ef(O,this,x,h,R,w,S),Hl(this,y,"error")}})}catch(T){this.semaphore.release();let k=Date.now()-E;ef(T,this,x,h,k,w,S),Hl(this,y,"error")}}else{let T=Date.now()-E,k=tf("Semaphore locked","ESEMLOCKED");this.emit("semaphoreLocked",k,T),ef(k,this,x,h,T,w,S),Hl(this,y)}});if(this.options.coalesce)this.options.coalesceCache.set(y,C,this.options.coalesceTTL>0?Date.now()+this.options.coalesceTTL:0);return C}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((z)=>{this.emit("healthCheckFailed",z),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 ef(o,f,h,y,x,z,C){if(clearTimeout(h),f.options.errorFilter(o,...y))f.emit("success",o,x);else{zoe(f,o,y,x);let w=fA(f,o,y);if(w)return z(w)}C(o)}function fA(o,f,h){if(o[Gl])try{let y=o[Gl].apply(o[Gl],[...h,f]);if(o.emit("fallback",y,f),y instanceof Promise)return y;return Promise.resolve(y)}catch(y){return Promise.reject(y)}}function zoe(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 Hl(o,f,h){if(!h||o.options.coalesceResetOn.includes(h))o.options.coalesceCache?.delete(f)}function tf(o,f){let h=Error(o);return h.code=f,h[pA]=!0,h}var Coe=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(o)=>{let f=Math.random()*16|0;return(o==="x"?f:f&3|8).toString(16)});mA.exports=hA=xb});var vA=i(function(yA,bA){bA.exports=yA=gA()});var rf=i(function(To){var woe=To&&To.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(To,"__esModule",{value:!0});To.circuitBreakerDefaultOptions=To.circuitBreakers=void 0;To.circuitBreaker=Ooe;var Soe=woe(vA()),Eoe=Ss();To.circuitBreakers={};To.circuitBreakerDefaultOptions={timeout:!1,errorThresholdPercentage:50,volumeThreshold:10,resetTimeout:30000,cache:!1};function Toe(o){return Eoe.isAxiosError(o)&&!!o.response?.status&&o.response.status.toString().startsWith("4")}function koe({uri:o,tenantId:f="tenant_id"}){return`${o}::${f}`}function Ooe(){return Ioe(koe,Toe)}function Ioe(o,f){return(h)=>(y)=>Roe(o(h.context),f).fire(h.fn,y)}function Roe(o,f){if(!To.circuitBreakers[o])To.circuitBreakers[o]=new Soe.default(Aoe,{...To.circuitBreakerDefaultOptions,errorFilter:f});return To.circuitBreakers[o]}function Aoe(o,...f){return o(...f)}});var _b=i(function(zA){Object.defineProperty(zA,"__esModule",{value:!0});zA.resilience=Boe;var xA=Hp(),_A=Gp(),Poe=rf(),Doe={retry:!1,timeout:!0,circuitBreaker:!0};function Boe(o){let f={...Doe,...o},h=[];if(typeof f.retry==="number")h.push(_A.retry(f.retry));else if(f.retry)h.push(_A.retry());if(f.circuitBreaker)h.push(Poe.circuitBreaker());if(typeof f.timeout==="number")h.push(xA.timeout(f.timeout));else if(f.timeout)h.push(xA.timeout());return h}});var Va=i(function(sn){var Noe=sn&&sn.__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]}),Kl=sn&&sn.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))Noe(f,o,h)};Object.defineProperty(sn,"__esModule",{value:!0});Kl(Hp(),sn);Kl(Gp(),sn);Kl(JR(),sn);Kl(rf(),sn);Kl(_b(),sn)});var nf=i(function(On){var joe=On&&On.__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]}),Moe=On&&On.__setModuleDefault||(Object.create?function(o,f){Object.defineProperty(o,"default",{enumerable:!0,value:f})}:function(o,f){o.default=f}),qoe=On&&On.__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")joe(h,f,y[x])}return Moe(h,f),h}}();Object.defineProperty(On,"__esModule",{value:!0});On.csrf=Uoe;On.buildCsrfFetchHeaders=EA;var CA=c("url"),cn=se(),wA=qoe(Ss()),Foe=Va(),of=cn.createLogger("csrf-middleware");function Uoe(o){return(f)=>async(h)=>{if(!$oe(h))return f.fn(h);let y=await Woe(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 $oe(o){if(o.method.toLowerCase()==="get")return of.debug("Method is GET no CSRF token needed."),!1;if(cn.pickValueIgnoreCase(o.headers,"x-csrf-token"))return of.debug("CSRF token header was already provided. Existing token used."),!1;return!0}function Voe(o){if(!o.url)o.url="/";else if(!o.url.endsWith("/"))o.url=`${o.url}/`;return o}function Hoe(o){if(o.url.endsWith("/"))o.url=cn.removeTrailingSlashes(o.url);return o}function Goe(o){return Object.values(cn.pickIgnoreCase(o,"x-csrf-token"))[0]}function SA(o){let f=Object.values(cn.pickIgnoreCase(o,"set-cookie"));return cn.flatten(f).map((h)=>h.split(";")[0]).join(";")}function EA(o){let f=cn.first(Object.keys(cn.pickIgnoreCase(o,"content-length")))||"content-length";return{"x-csrf-token":"Fetch",...o,[f]:0}}async function zb(o,f){try{let h=await Foe.executeWithMiddleware(f.middleware,{fn:wA.default.request,fnArgument:o,context:f.context});return Cb(h.headers)}catch(h){if((0,wA.isAxiosError)(h)&&Cb(h.response?.headers))return Cb(h.response?.headers);of.warn(new cn.ErrorWithCause(`Failed to get CSRF token from URL: ${o.url}.`,h))}}function Cb(o){if(!o)return;let f=Goe(o);if(!f)return;let h=SA(o)?{cookie:SA(o)}:{};return{"x-csrf-token":f,...h}}function Koe(o,f){if(!o||!f)return!1;if(!cn.isValidUrl(o)||!cn.isValidUrl(f))return!1;return new CA.URL(o).hostname!==new CA.URL(f).hostname}async function Woe(o,f){let{data:h,params:y,parameterEncoder:x,...z}=o;if(Koe(f.url,o.baseURL))of.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 C={...z,method:f.method||"head",url:f.url||o.url,headers:EA(o.headers)};if(f.url)return zb(C,f);return await zb(Voe(C),f)??await zb(Hoe(C),f)}});var RA=i(function(OA){Object.defineProperty(OA,"__esModule",{value:!0});OA.compressorsCache=void 0;OA.compress=Xoe;var sf=c("node:util"),Wl=se(),TA=Wl.createLogger({package:"http-client",messageContext:"compress-request-middleware"});function Joe(){return OA.compressorsCache??=(async()=>{let o=await import("node:zlib").catch(()=>({}));return{...o.brotliCompress&&{brotli:sf.promisify(o.brotliCompress)},...o.gzip&&{gzip:sf.promisify(o.gzip)},...o.deflate&&{deflate:sf.promisify(o.deflate)},...o.zstdCompress&&{zstd:sf.promisify(o.zstdCompress)}}})()}function kA(o){return Object.keys(o).length?Object.keys(o).join(", "):"N/A"}function Zoe(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(S){return TA.error(new Wl.ErrorWithCause("Could not determine payload size for 'auto' compression decision. Payload will not be compressed.",S)),!1}let x=f?.autoCompressMinSize??1024,z=y>=x,C=z?">=":"<",w=z?"Compressing":"Skipping compression";return TA.debug(`Auto compression: payload size ${y} bytes ${C} threshold ${x} bytes. ${w}.`),z}function Yoe(o){switch(o){case"brotli":return"br";case void 0:case"gzip":return"gzip";default:return o}}function Xoe(o){return(f)=>async(h)=>{let y=o?.algorithm??"gzip",x=Zoe(h.data,o),z=o?.mode??"auto";if(!x&&z!=="header-only")return f.fn(h);let C=Wl.pickValueIgnoreCase(h.headers,"content-encoding"),w=Yoe(y),S=C?`${C}, ${w}`:w;if(h.headers=Wl.mergeIgnoreCase(h.headers,{"content-encoding":S}),z==="header-only")return f.fn(h);let E=await Joe(),T=E[y];if(!T){if(!Object.keys(E).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: ${kA(E)}.`);throw Error(`Unsupported compression algorithm '${y}'. Supported algorithms are: ${kA(E)}.`)}let k=await T(h.data,o?.compressOptions).catch((O)=>{throw new Wl.ErrorWithCause(`Failed to compress request payload using '${y}'.`,O)});return h.data=k,f.fn(h)}}});var af=i(function(Ha){Object.defineProperty(Ha,"__esModule",{value:!0});Ha.resilience=Ha.circuitBreaker=Ha.retry=Ha.timeout=void 0;var ene=Hp();Object.defineProperty(Ha,"timeout",{enumerable:!0,get:function(){return ene.timeout}});var tne=Gp();Object.defineProperty(Ha,"retry",{enumerable:!0,get:function(){return tne.retry}});var rne=rf();Object.defineProperty(Ha,"circuitBreaker",{enumerable:!0,get:function(){return rne.circuitBreaker}});var one=_b();Object.defineProperty(Ha,"resilience",{enumerable:!0,get:function(){return one.resilience}})});var PA=i(function(T2e,AA){class ks extends Error{}ks.prototype.name="InvalidTokenError";function ine(o,f){if(typeof o!=="string")throw new ks(`Invalid token specified: missing part #${f+1}`);let h;try{h=Buffer.from(o,"base64url").toString("utf8")}catch(y){throw new ks(`Invalid token specified: invalid base64 for part #${f+1} (${y.message})`)}try{return JSON.parse(h)}catch(y){throw new ks(`Invalid token specified: invalid json for part #${f+1} (${y.message})`)}}function sne(o,f={}){if(typeof o!=="string")throw new ks("Invalid token specified: must be a string");let h=f.header===!0?0:1;return ine(o.split(".")[h],h)}AA.exports={jwtDecode:sne,InvalidTokenError:ks}});var Jl=i(function(k2e,BA){class DA 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}}BA.exports=DA});var ln=i(function(O2e,NA){var ane=Jl();class LA extends ane{constructor(o){super(o);this.name="ValidationError",this.statusCode=401}}NA.exports=LA});var wb=i(function(I2e,MA){var cne=ln();class jA extends cne{#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}}MA.exports=jA});var un=i(function(R2e,qA){qA.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 Zl=i(function(A2e,UA){class FA{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)}}UA.exports=FA});var In=i(function(P2e,HA){var{jwtDecode:$A}=PA(),Yl=wb(),{TOKEN_DATE_LEEWAY:VA}=un(),lne=Zl();class Qn{static decodeCache=null;static enableDecodeCache(o={}){if(o.impl)Qn.decodeCache=o.impl;else Qn.decodeCache=new lne(o?.size||100)}static disableDecodeCache(){Qn.decodeCache=!1}#e;#t;#r;constructor(o,{header:f,payload:h}={}){if(this.#e=o,!f||!h){let y=null;if(Qn.decodeCache)y=Qn.decodeCache.get(o);if(y!=null)f=y.header,h=y.payload;else if({header:f,payload:h}=this.#o(o),Qn.decodeCache)Qn.decodeCache.set(o,{header:f,payload:h})}this.#t=f,this.#r=h}#o(o){try{return{header:$A(o,{header:!0}),payload:$A(o)}}catch(f){throw new Yl(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 Yl(this.jwt,null,`Invalid value '${o}' inside 'nbf' claim.`);let f=new Date(o*1000);if(isNaN(f.getTime()))throw new Yl(this.jwt,null,`Failed to parse 'nbf' claim value '${o}' into a valid date.`);return(f.getTime()-Date.now())/1000>VA}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 Yl(this.jwt,null,`Invalid value '${o}' inside 'exp' claim.`);let f=new Date(o*1000);if(isNaN(f.getTime()))throw new Yl(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)+VA;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}}HA.exports=Qn});var Sb=i(function(D2e,KA){var une=ln();class GA extends une{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"}}KA.exports=GA});var Eb=i(function(B2e,JA){var dne=ln();class WA extends dne{#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}}JA.exports=WA});var kb=i(function(L2e,o2){var{X509Certificate:pne}=c("crypto"),fne=Eb(),{PEM_HEADER:ZA,PEM_FOOTER:YA}=un();o2.exports={parsePemCertificate(o){if(o=o.replaceAll("\\n",`
90
+ `),!o.startsWith(ZA))o=`${ZA}
91
+ ${o}`;if(!o.endsWith(YA))o=`${o}
92
+ ${YA}`;try{return new pne(o)}catch(f){throw new fne(o,f)}},extractPemFromClientCertHeader(o){if(!o)return null;if(XA(o))return QA(o);else return o},isXfccFormat:XA,parseXfccToPem:QA,splitXfccString:Tb,isEscaped:e2,extractCertFromXfccEntry:t2,unquoteAndDecodeCert:r2};function XA(o){if(!o||typeof o!=="string")return!1;return/\bHash=/i.test(o)}function QA(o){if(!o||typeof o!=="string")return null;let f=Tb(o,","),h=f[f.length-1];return t2(h)}function Tb(o,f){let h=[],y="",x=!1;for(let z=0;z<o.length;z++){let C=o[z];if(C==='"'&&!e2(o,z))x=!x;if(C===f&&!x)h.push(y.trim()),y="";else y+=C}if(y.trim())h.push(y.trim());return h}function e2(o,f){let h=0,y=f-1;while(y>=0&&o[y]==="\\")h++,y--;return h%2===1}function t2(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(),z=h.substring(y+1).trim();if(x.toLowerCase()==="cert")return r2(z)}return null}function r2(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 ei=i(function(N2e,s2){var{CORRELATIONID_HEADERS:n2,FORWARDED_CLIENTCERTIFICATE_HEADER:hne}=un(),{extractPemFromClientCertHeader:mne}=kb();class i2{#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<n2.length;h++)o.correlationId=f?.headers?.[n2[h]];o.clientCertificatePem??=mne(f?.headers?.[hne]),o.jwt??=f?.headers?.authorization?.split(" ")[1],o.skipValidation??=!1}}s2.exports=i2});var Os=i(function(j2e,c2){var gne=Jl();class a2 extends gne{constructor(o){super(o);this.name="ConfigurationError",this.statusCode=500}}c2.exports=a2});var Ob=i(function(M2e,p2){var u2=[],d2=[];function l2(o){let f=o.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*?");return new RegExp("^"+f+"$")}var yne=process.env.DEBUG||"";for(let o of yne.split(/[\s,]+/)){if(!o)continue;if(o[0]==="-")u2.push(l2(o.slice(1)));else d2.push(l2(o))}function bne(o){if(u2.some((f)=>f.test(o)))return!1;return d2.some((f)=>f.test(o))}function vne(o){function f(h,...y){if(!f.enabled)return;f.log(`${o} ${h}`,...y)}return f.namespace=o,f.enabled=bne(o),f.log=console.error.bind(console),f}p2.exports=vne});var dn=i(function(q2e,h2){var xne=Ob(),_ne=xne("xssec"),zne=ln();class f2 extends zne{#e;constructor(o,f="Token is not valid."){super(f);if(this.name="TokenValidationError",this.token=o,_ne.enabled)this.jwt=o.jwt}get token(){return this.#e}set token(o){this.#e=o}}h2.exports=f2});var y2=i(function(F2e,g2){var Cne=dn();class m2 extends Cne{constructor(o,f="Token is expired."){super(o,f);this.name="ExpiredTokenError"}}g2.exports=m2});var x2=i(function(U2e,v2){var wne=Os();class b2 extends wne{constructor(o="The service credentials are missing mandatory properties."){super(o);this.name="InvalidCredentialsError"}}v2.exports=b2});var C2=i(function($2e,z2){var Sne=dn();class _2 extends Sne{#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}}z2.exports=_2});var Ib=i(function(V2e,S2){var Ene=dn();class w2 extends Ene{constructor(o,f="Token signature is invalid."){super(o,f);this.name="InvalidTokenSignatureError"}}S2.exports=w2});var k2=i(function(H2e,T2){var Tne=ln();class E2 extends Tne{constructor(o="Request is missing a forwarded client certificate which is required to validate the token."){super(o);this.name="MissingClientCertificateError"}}T2.exports=E2});var R2=i(function(G2e,I2){var kne=dn();class O2 extends kne{constructor(o,f="Token is missing an issuer which is required to validate the signature."){super(o,f);this.name="MissingIssuerError"}}I2.exports=O2});var cf=i(function(K2e,P2){var One=ln();class A2 extends One{#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}}P2.exports=A2});var Rb=i(function(W2e,B2){var Ine=ln();class D2 extends Ine{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"}}B2.exports=D2});var lf=i(function(J2e,N2){var Rne=Jl();class L2 extends Rne{#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}}N2.exports=L2});var q2=i(function(Z2e,M2){var Ane=dn();class j2 extends Ane{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"}}M2.exports=j2});var Ga=i(function(Y2e,U2){var Pne=lf();class F2 extends Pne{#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}}U2.exports=F2});var uf=i(function(X2e,G2){var Dne=lf();class $2 extends Dne{#e;#t;#r;#o;#n;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}get retryAfter(){return this.#n}set retryAfter(o){this.#n=o}}G2.exports=$2});var Ab=i(function(Q2e,J2){var Bne=Ga();class W2 extends Bne{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"}}J2.exports=W2});var Pb=i(function(ePe,Y2){var Lne=dn();class Z2 extends Lne{#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}}Y2.exports=Z2});var tP=i(function(tPe,eP){var Nne=dn();class X2 extends Nne{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}}eP.exports=X2});var nP=i(function(rPe,oP){var jne=dn();class rP extends jne{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}}oP.exports=rP});var aP=i(function(oPe,sP){var Mne=dn();class iP extends Mne{clientCertificate;constructor(o,f,h="X5t validation of token failed."){super(o,h);this.name="X5tError",this.clientCertificate=f}get cert(){return this.clientCertificate}}sP.exports=iP});var Is=i(function(nPe,cP){var qne=Os(),Fne=y2(),Une=Eb(),$ne=x2(),Vne=C2(),Hne=wb(),Gne=Ib(),Kne=k2(),Wne=R2(),Jne=Sb(),Zne=cf(),Yne=Rb(),Xne=lf(),Qne=q2(),eie=Ga(),tie=uf(),rie=Ab(),oie=dn(),nie=Pb(),iie=tP(),sie=ln(),aie=nP(),cie=aP(),lie=Jl();cP.exports={ConfigurationError:qne,ExpiredTokenError:Fne,InvalidClientCertificateError:Une,InvalidCredentialsError:$ne,InvalidIssuerError:Vne,InvalidJwtError:Hne,InvalidTokenSignatureError:Gne,MissingClientCertificateError:Kne,MissingIssuerError:Wne,MissingJwtError:Jne,MissingKidError:Zne,MissingVerificationKeyError:Yne,NetworkError:Xne,NotYetValidTokenError:Qne,RequestError:eie,ResponseError:tie,TimeoutError:rie,TokenValidationError:oie,UnsupportedAlgorithmError:nie,UntrustedIssuerError:iie,ValidationError:sie,WrongAudienceError:aie,X5tError:cie,XssecError:lie}});var dP=i(function(iPe,uP){class lP{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)}}uP.exports=lP});var Rn=i(function(sPe,fP){var uie=Ob(),die=dP(),Xl=uie("xssec");Xl.log=console.log.bind(console);var pP={info:(o,...f)=>Xl(o,...f),warn:(o,...f)=>Xl(o,...f),error:(o,...f)=>Xl(o,...f),debug:(o,...f)=>Xl(o,...f)};function pie(o=""){return new die(pP,o)}function fie(o){Object.assign(pP,o)}fP.exports={getLogger:pie,setLoggers:fie}});var Ql=i(function(aPe,hP){var hie=In(),mie=Sb(),gie=ei(),{WrongAudienceError:yie}=Is(),{getLogger:bie}=Rn(),Db=bie("createSecurityContext.js");hP.exports=vie;async function vie(o,f){if(f={...f},gie.buildContextConfig(f),f.token==null&&f.jwt==null)throw new mie;let h=f.token??new hie(f.jwt);Db.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=xie(o,h),y!=null)Db.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 yie(h,o,"The audiences of the token fit none of the supplied services.");return y.createSecurityContext(h,f)}function xie(o,f){for(let h of o)try{if(h.acceptsTokenAudience(f))return h}catch(y){Db.debug(`${h.constructor.name} declined the token during service selection: ${y.message}`)}return}});var Bb=i(function(cPe,yP){var mP=Os(),_ie=ei();class gP extends _ie{xsuaaContext;constructor(o,f,h){super(o,f,h)}get servicePlans(){if(!this.service.hasProofTokenEnabled())throw new mP("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 mP("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||""}}}yP.exports=gP});var eu=i(function(lPe,vP){var zie=ei(),{getLogger:Cie}=Rn(),{GRANTTYPE_CLIENTCREDENTIALS:Lb}=un(),Rs=Cie("XsuaaSecurityContext.js");class bP extends zie{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===Lb)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===Lb)return Rs.debug(`Call to ${o} not allowed with a token of grant type ${Lb}.`),null;return f}}vP.exports=bP});var Nb=i(function(uPe,_P){var wie=eu();class xP extends wie{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}}_P.exports=xP});var jb=i(function(dPe,CP){var Sie=eu();class zP extends Sie{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}}CP.exports=zP});var EP=i(function(pPe,SP){class wP{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||!Number.isFinite(o.lastRefresh))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}canServeExpired(o,f){return this.hasData(o)&&Number.isFinite(o.lastRefresh)&&f>0&&Date.now()-o.lastRefresh<=this.expirationTime+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}}SP.exports=wP});var Mb=i(function(fPe,kP){var Eie=Ga();class TP extends Eie{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=TP});var RP=i(function(hPe,IP){var Tie=EP(),qb=Os(),kie=Ga(),Oie=uf(),Iie=Mb(),{getLogger:Rie}=Rn(),Fb=Rie("ResponseCache.js");class ru{static get DEFAULT_EXPIRATION_TIME(){return 1800000}static get DEFAULT_REFRESH_PERIOD(){return 900000}static get DEFAULT_EXPIRATION_GRACE_PERIOD(){return 0}store;#e;endpointName;expirationTime;refreshPeriod;expirationGracePeriod;constructor({expirationTime:o=ru.DEFAULT_EXPIRATION_TIME,refreshPeriod:f=ru.DEFAULT_REFRESH_PERIOD,expirationGracePeriod:h=ru.DEFAULT_EXPIRATION_GRACE_PERIOD,endpointName:y="response",impl:x}={}){if(o<0)throw new qb("ResponseCache expirationTime must be >=0.");if(f<0||f>o)throw new qb("ResponseCache refreshPeriod must be between 0 and <expirationTime>.");if(!Number.isFinite(h)||h<0)throw new qb("ResponseCache expirationGracePeriod must be a finite number >=0.");this.store=x??new Map,this.#e=new Map,this.endpointName=y,this.expirationTime=o,this.refreshPeriod=f,this.expirationGracePeriod=h}async getOrRequest(o,f,{correlationId:h,deserialize:y}={}){let x=this.#e.get(o);if(!x)x=new Tie(this,o,f(),y),this.#e.set(o,x);let z=this.store.get(o);if(z&&typeof z.then==="function")z=await z;if(!x.hasData(z)||x.isExpired(z)&&!x.canServeExpired(z,this.expirationGracePeriod))Fb.debug(`Awaiting ${this.endpointName} refresh because replica for key=${o} has ${x.hasData(z)?"expired":"no"} data.)`,{correlationId:h}),z=await x.refresh(h);else if(x.isExpired(z))try{z=await x.refresh(h)}catch(C){if(!OP(C)||!x.canServeExpired(z,this.expirationGracePeriod))throw C;let w=Date.now()-z.lastRefresh-x.expirationTime;Fb.warn(`Serving expired ${this.endpointName} after refresh failure (${w}ms past expiration).`,{correlationId:h})}else if(x.isStale(z,this.refreshPeriod))Fb.debug(`Asynchronous ${this.endpointName} refresh scheduled because replica for key=${o} is stale (remaining time = ${x.remainingTime(z)}ms < ${this.refreshPeriod}ms = refresh period).`),x.refresh(h).catch(()=>{});return x.resolve(z)}async clear(){this.#e.clear(),await this.store.clear()}}function OP(o){if(o instanceof Iie)return o.retryErrors.length>0&&o.retryErrors.every(OP);if(o instanceof kie)return!0;return o instanceof Oie&&(o.responseCode===408||o.responseCode===429||o.responseCode>=500&&o.responseCode<600)}IP.exports=ru});var DP=i(function(mPe,PP){var Aie=c("https"),Pie=c("http"),Die=c("zlib"),Bie=c("url");function Lie(o){switch(o){case"https:":return Aie;case"http:":return Pie;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 AP{#e;#t;constructor(o,f){this.#e=o,this.#t=f}async#r(){let o=this.#e;return new Promise((f,h)=>{let y=Die.createGunzip();o.pipe(y);let x=[];y.on("data",function(z){x.push(z.toString())}),y.on("end",function(){f(x.join(""))}),y.on("error",(z)=>{h(new ou(`request to ${this.requestUrl} failed, reason: ${z.message}`,z))})})}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.on("data",function(x){y.push(x)}),o.on("end",function(){f(Buffer.concat(y).toString("utf8"))}),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 Nie(o,f={}){jie(f),qie(f),Mie(f);let h=Lie(new Bie.URL(o).protocol);return new Promise(function(y,x){let z=h.request(o,f,(C)=>{y(new AP(C,z))});if(z.on("error",(C)=>{x(new ou(`request to ${o} failed, reason: ${C.message}`,C))}),z.on("timeout",()=>{z.destroy(),x(new ou(`request to ${o} timed out.`,{code:"ETIMEDOUT"}))}),f.data)z.write(f.data);z.end()})}function jie(o){o.method??="GET"}function Mie(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 qie(o){if(o.headers==null)o.headers={};if(o.headers["Accept-Encoding"]="gzip,deflate",!o.headers.Accept&&!o.headers.accept)o.headers.Accept="*/*"}PP.exports=Nie});var Ub=i(function(gPe,LP){var{CLIENT_CERTIFICATE_HEADER:BP}=un();LP.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?.[BP])f.headers[BP]="<clientCertificatePem>";return f}}});var df=i(function(yPe,qP){var Fie=DP(),{getLogger:Uie}=Rn(),NP=Ga(),$ie=Mb(),jP=uf(),Vie=Ab(),{CORRELATIONID_HEADER_VCAP:Hie,DEFAULT_TIMEOUT:Gie,MAX_TIMEOUT:Kie,USER_AGENT:Wie}=un(),{shrinkRequestOptionsForLog:Jie}=Ub(),As=Uie("jsonRequest.js"),Zie=(o)=>new Promise((f)=>{setTimeout(()=>{f()},o)});function Yie(o){if(o==null)return;let f=String(o).trim();if(/^\d+$/.test(f))return Number(f)*1000;let h=Date.parse(f);return Number.isNaN(h)?void 0:Math.max(0,h-Date.now())}function Xie(o,f,h){let y=h?.retryAfter;if(y!=null)return f.maxDelay!=null?Math.min(y,f.maxDelay):y;if(f.strategy==="exponential"){let x=f.initialDelay*Math.pow(f.factor,o);return Math.min(x,f.maxDelay)}return f.initialDelay}function Qie(o){if(o instanceof jP){if(o.responseCode>=500&&o.responseCode<=600||o.responseCode==429||o.responseCode==408)return!0}else if(o instanceof NP)return!0;return!1}async function ese(o,f,h){let{requestName:y,correlationId:x}=h,z=f.retry,C=[],w={...f,name:y};for(let E=0;E<=z.retries;E++)try{if(E>0)As.info(`Retry attempt ${E}/${z.retries} for [${y}] to ${o}`,{correlationId:x});return await MP(o,f,h)}catch(T){if(!Qie(T))throw T;if(C.push(T),E>=z.retries)break;let k=Xie(E,z,T);As.debug(`Waiting ${k}ms before next retry`,{correlationId:x}),await Zie(k)}let S=new $ie(o,w,C);throw As.error(S.message,{correlationId:x}),S}async function MP(o,f,{requestName:h,correlationId:y,extractHeaders:x}){if(y)f.headers[Hie]=y;As.debug(`HTTP request [${h}] to ${o} with options`,{correlationId:y,...Jie(f)});let z;try{z=await Fie(o,f)}catch(w){let S={...f,name:h},E=w.code==="ETIMEDOUT"?new Vie(o,S,w):new NP(o,S,w);throw As.error(E.message,{correlationId:y}),E}if(!z.ok){let w=await z.text(),S=new jP(o,{...f,name:h},z.status,w);throw S.retryAfter=Yie(z.headers?.get?.("retry-after")),As.error(S.message,{correlationId:y}),S}let C=await z.json();if(As.debug(`HTTP response [${h}]:`,{correlationId:y,...C}),x!=null)C[x]=z.headers;return C}async function tse(o,f,h={}){if(Object.assign(f,{redirect:"error",follow:0,timeout:Math.min(Kie,f.timeout??Gie)}),f.headers??={},Object.assign(f.headers,{Accept:"application/json","User-Agent":Wie}),f.retry)return ese(o,f,h);else return MP(o,f,h)}qP.exports={jsonRequest:tse}});var su=i(function(bPe,FP){function rse(o={}){return Object.entries(o).filter(([,f])=>f!=null).map(([f,h])=>`${f}=${h}`).join("|")}FP.exports=rse});var ff=i(function(vPe,WP){var{Agent:ose}=c("node:https"),Ps=RP(),UP=Zl(),{ConfigurationError:au,ExpiredTokenError:nse,InvalidCredentialsError:$P,MissingKidError:ise,NotYetValidTokenError:sse,WrongAudienceError:ase}=Is(),{jsonRequest:pf}=df(),VP=su(),{DEFAULT_JWT_BEARER_FETCH_TIMEOUT:cse,DEFAULT_TIMEOUT:lse,GRANTTYPE_CLIENTCREDENTIALS:HP,GRANTTYPE_JWTBEARER:GP,GRANTTYPE_PASSWORD:KP,MAX_TIMEOUT:use}=un();class Pr{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 Ps({endpointName:"OIDC configuration"});static#t={};static#r={};credentials;config;#o;#n;#i;#s;#a;contextExtensions=[];constructor(o,f={}){if(o==null)throw new au("Service requires service credentials.");if(this.credentials=o,this.config=Pr.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(){if(this.config.oidc)return this.#i??=new Ps({...this.config.oidc,endpointName:"OIDC configuration"}),this.#i;return Pr.#e}set oidcCache(o){Pr.#e=o}get jwksCache(){if(!this.#n)this.#n=this.config.validation.jwks.shared&&!this.config.validation.jwks.impl?this.#u(this.config):new Ps({...this.config.validation.jwks,endpointName:"JWKS"});return this.#n}get signatureCache(){if(this.#s===void 0)if(this.config.validation.signatureCache.impl)this.#s=this.config.validation.signatureCache.impl;else if(this.config.validation.signatureCache.enabled!==!1)this.#s=Pr.#d(this.config.validation.signatureCache);else this.#s=null;return this.#s}get tokenFetchCache(){if(this.#a===void 0)if(this.config.tokenfetch.cache.impl)this.#a=this.config.tokenfetch.cache.impl;else if(this.config.tokenfetch.cache.enabled!==!1)this.#a=new UP(this.config.tokenfetch.cache.size);else this.#a=null;return this.#a}#u(){return Pr.#t[this.constructor.name]??=new Ps({...this.config.validation.jwks,endpointName:"JWKS"}),Pr.#t[this.constructor.name]}static#d(o){let f=Pr.#r[this.constructor.name];if(f!=null&&f.size!==o.size)throw new au(`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 Pr.#r[this.constructor.name]??=new UP(o.size),Pr.#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 $P(`${this.constructor.name} is missing the properties ${h} inside its credentials for: ${o}.`)}async validateToken(o,f){if(o.expired)throw new nse(o);if(o.notYetValid)throw new sse(o);if(!this.acceptsTokenAudience(o))throw new ase(o,this);await this.validateTokenSignature(o,f)}async validateTokenSignature(o,f){if(!o.header.kid)throw new ise(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=VP({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 pf(f,h,{requestName:`${this.constructor.name}.fetchOpenIDConfiguration`,correlationId:o})}async getClientCredentialsToken(o={}){if(!this.tokenFetchCache)return this.fetchClientCredentialsToken(o);let f=HP,h=await this.getTokenUrl(f,o),y=this.buildTokenRequest(f,o),x=this.#c(h,y);return this.#l(x,()=>this.fetchClientCredentialsToken(o))}async getJwtBearerToken(o,f={}){if(!this.tokenFetchCache)return this.fetchJwtBearerToken(o,f);let h=GP,y=await this.getTokenUrl(h,f),x=this.buildTokenRequest(h,f);x.body.append("assertion",o);let z=this.#c(y,x);return this.#l(z,()=>this.fetchJwtBearerToken(o,f))}async getPasswordToken(o,f,h={}){if(!this.tokenFetchCache)return this.fetchPasswordToken(o,f,h);let y=KP,x=await this.getTokenUrl(y,h),z=this.buildTokenRequest(y,h);z.body.append("username",o),z.body.append("password",f);let C=this.#c(x,z);return this.#l(C,()=>this.fetchPasswordToken(o,f,h))}#c(o,f){let h={};for(let[x,z]of f.body.entries())h[x]=z;let y={url:o.toString(),...h};if(f.headers)for(let[x,z]of Object.entries(f.headers))y[`header_${x}`]=z;return VP(y)}async#l(o,f){let h=await this.tokenFetchCache.get(o);if(h){let{response:z,expiresAt:C}=h;if((C-Date.now())/1000>Pr.DEFAULT_TOKEN_CACHE_LEEWAY)return z}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=HP,h=await this.getTokenUrl(f,o),y=this.buildTokenRequest(f,o);return pf(h,y,{requestName:`${this.constructor.name}.fetchClientCredentialsToken`,correlationId:o.correlationId})}async fetchPasswordToken(o,f,h={}){let y=KP,x=await this.getTokenUrl(y,h),z=this.buildTokenRequest(y,h);return z.body.append("username",o),z.body.append("password",f),pf(x,z,{requestName:`${this.constructor.name}.fetchPasswordToken`,correlationId:h.correlationId})}async fetchJwtBearerToken(o,f={}){let h=GP,y=await this.getTokenUrl(h,f);f.timeout??=cse;let x=this.buildTokenRequest(h,f);return x.body.append("assertion",o),pf(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 ose({key:this.credentials.key,cert:this.credentials.certificate});else throw new $P("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??=Ps.DEFAULT_EXPIRATION_TIME,o.validation.jwks.refreshPeriod??=Ps.DEFAULT_REFRESH_PERIOD,o.validation.jwks.expirationGracePeriod??=Ps.DEFAULT_EXPIRATION_GRACE_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={...Pr.DEFAULT_SIGNATURE_CACHE_CONFIG,...o.validation.signatureCache,enabled:!0};o.tokenfetch??={},o.tokenfetch.cache??=Pr.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={...Pr.DEFAULT_TOKEN_CACHE_CONFIG,...f,enabled:!0};if(o.requests??={},o.requests.timeout=Math.min(use,o.requests.timeout??lse),o.requests.retry)if(o.requests.retry===!0)o.requests.retry=Pr.DEFAULT_RETRY_CONFIG;else o.requests.retry={...Pr.DEFAULT_RETRY_CONFIG,...o.requests.retry};return o}async createSecurityContext(o,f={}){throw new au("This abstract function MUST be called on a service-specific implementation.")}async getJwks(o,f){throw new au("This abstract function MUST be called on a service-specific implementation.")}async getTokenUrl(o,f={}){throw new au("This abstract function MUST be called on a service-specific implementation.")}}WP.exports=Pr});var hf=i(function(xPe,ZP){var dse=In();class JP extends dse{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}}ZP.exports=JP});var $b=i(function(_Pe,YP){var An=c("crypto"),pse=Pb(),fse=Ib(),hse=An.getHashes();class cu{key;pubKey;constructor(o){this.key=o,this.pubKey=An.createPublicKey({key:o,format:"jwk"})}static fromPEM(o){let f=cu.cleanUpPemKey(o),y=An.createPublicKey({key:f,format:"pem"}).export({format:"jwk"});return new cu(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 fse(o)}validateSignatureWithoutCache(o){let f=cu.mapAlg(o.header.alg);if(f==null||!hse.includes(f.hash))throw new pse(o,o.header.alg);let[h,y,x]=o.jwt.split("."),z=An.createVerify(f.hash);return z.update(`${h}.${y}`),z.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:An.constants.RSA_PKCS1_PSS_PADDING,saltLength:An.constants.RSA_PSS_SALTLEN_DIGEST}};case"PS384":return{hash:"RSA-SHA384",verifyOptions:{padding:An.constants.RSA_PKCS1_PSS_PADDING,saltLength:An.constants.RSA_PSS_SALTLEN_DIGEST}};case"PS512":return{hash:"RSA-SHA512",verifyOptions:{padding:An.constants.RSA_PKCS1_PSS_PADDING,saltLength:An.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}}YP.exports=cu});var Vb=i(function(zPe,QP){var mse=$b(),gse=cf();class XP{constructor(o=[]){this.keys=Object.create(null);for(let f of o)this.keys[f.kid]=new mse(f)}get(o){let f=this.keys[o];if(!f)throw new gse(o,`JWKS does not contain a key for kid=${o}`);return f}}QP.exports=XP});var lu=i(function(CPe,tD){var yse=In();class eD extends yse{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}}tD.exports=eD});var Oi=i(function(wPe,oD){var bse=ff(),vse=ei(),xse=eu(),uu=lu(),_se=Vb(),{jsonRequest:zse}=df(),{HTTPS_SCHEME:mf,ZID_QUERY_PARAMETER:Cse,ZID_HEADER:wse}=un(),Sse=su(),{ResponseError:Ese,WrongAudienceError:Tse}=Is(),kse=In();class rD extends bse{#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 uu))o=new uu(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 uu(o);else if(o instanceof kse&&!(o instanceof uu))o=new uu(o.jwt,{header:o.header,payload:o.payload});if(vse.buildContextConfig(f),f.skipValidation!==!0&&this.config.validation.enabled!==!1)await this.validateToken(o,f);let h=new xse(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=Sse(y),z=()=>async(w)=>({keys:(await this.fetchJwks(h,w)).keys}),C;try{C=await this.jwksCache.getOrRequest(x,z,{correlationId:f.correlationId,deserialize:(w)=>new _se(w.keys)})}catch(w){if(w instanceof Ese&&w.responseCode===400)throw new Tse(o,this,`The online validation in the JWKS endpoint of the XSUAA server responded with 400: '${w.responseText}'. This indicates that the token should not be accepted by this service.`);throw w}return C}get jwksBaseUrl(){if(!this.#t){this.validateCredentials("fetch JWKS","uaadomain");let{uaadomain:o}=this.credentials;if(o.startsWith(mf))this.#t=o;else this.#t=`${mf}${o}`}return this.#t}async fetchJwks(o,f){let h=new URL(this.jwksBaseUrl+this.endpoints.jwks);if(o.zid)h.searchParams.append(Cse,o.zid);let y=this.buildRequest({method:"GET"});return zse(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[wse]=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 z=this.credentials.certificate?this.credentials.uaadomain.replace("authentication.","authentication.cert."):this.credentials.uaadomain;if(h&&y==null)x=`${mf}${h}.${z}`;else x=`${mf}${z}`}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)}}oD.exports=rD});var Hb=i(function(SPe,iD){var Ose=Zl(),{ConfigurationError:nD}=Is(),Ise=su(),Rse=Ql(),{getLogger:Ase}=Rn(),Pse=Oi(),Dse=hf(),Ii=Ase("XsuaaLegacyExtension.js");class gf{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 nD("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??=gf.DEFAULT_CACHE_CONFIG,o.enabled===!1||o.size===0)return null;else if(o.impl)return o.impl;else{let f=o.size??gf.DEFAULT_CACHE_CONFIG.size;return new Ose(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=Ise({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(),z=new Dse(x),C=this.findXsuaaService(o.config.services,z);Ii.debug?.(`Fetching XSUAA token for IAS token with app_tid='${f.appTid}', jti='${f.payload.jti}', ias_iss='${f.issuer}'.`);let w=(await C.fetchJwtBearerToken(x,{zid:z.appTid})).access_token,S=await Rse(C,{...o.config,jwt:w,token:void 0,skipValidation:!0});return await this.cache?.set(h,S),S}findXsuaaService(o){let f=o.filter((h)=>h instanceof Pse);if(f.length<1)throw new nD("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]}}iD.exports=gf});var Ka=i(function(EPe,cD){var Bse=ff(),Lse=ei(),Nse=Bb(),du=hf(),jse=Vb(),Mse=Zl(),{MissingClientCertificateError:qse,MissingIssuerError:Fse,InvalidIssuerError:Use,UntrustedIssuerError:$se,X5tError:Gb,ConfigurationError:sD,ResponseError:Vse,WrongAudienceError:Hse}=Is(),{parsePemCertificate:Gse}=kb(),aD=su(),{escapeStringForRegex:Kse}=Ub(),{jsonRequest:Wse}=df(),{APP_TID_HEADER:Jse,AZP_HEADER:Zse,AZP_APP_TID_HEADER:Yse,CLIENT_CERTIFICATE_HEADER:Xse,CLIENTID_HEADER:Qse,HTTPS_SCHEME:Kb,SERVICE_PLAN_HEADER:eae,X5T_CNF_CLAIM:tae}=un(),rae=In(),oae=Hb();class ti extends Bse{static DEFAULT_ID_TOKEN_CACHE_CONFIG={enabled:!0,size:100};#e;constructor(o,f){super(o,f);if(this.config=ti.buildServiceConfiguration(this.config),this.config.xsuaaLegacyExtension){let h=this.config.xsuaaLegacyExtension===!0?{}:this.config.xsuaaLegacyExtension;this.contextExtensions.push(new oae(h))}}async createSecurityContext(o,f={}){if(typeof o==="string")o=new du(o);else if(o instanceof rae&&!(o instanceof du))o=new du(o.jwt,{header:o.header,payload:o.payload});if(Lse.buildContextConfig(f),f.skipValidation!==!0&&this.config.validation.enabled!==!1){if(this.#n(o)||this.hasX5tEnabled())if(f.clientCertificatePem==null)throw new qse;else f.clientCertificate=Gse(f.clientCertificatePem);await this.validateToken(o,f)}let h=new Nse(this,o,f);for(let y of this.contextExtensions)h=await y.extendSecurityContext(h)??h;return h}async validateToken(o,f){if(this.hasX5tEnabled())ti.validateTokenOwnership(o,f.clientCertificate);await super.validateToken(o,f)}async getJwks(o,f){this.validateCredentials("fetch JWKS","clientid","url");let h=ti.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},z=this.#n(o);if(z)x.certSub=f.clientCertificate?.subject,y.clientCertificatePem=f.clientCertificatePem?.replaceAll("\\n","").replaceAll(`
101
+ `,"");let C=aD(x),w=()=>{let k=h===this.credentials.url?this:this.#i(o),O=z?"headers":null;return async(R)=>{let I=await k.fetchJwks(y,{correlationId:R,extractHeaders:O});return{keys:I.keys,servicePlans:z?I.headers.get(eae)?.split(",").map((A)=>A.replaceAll('"',"")):null}}},S;try{S=await this.jwksCache.getOrRequest(C,w,{correlationId:f.correlationId,deserialize:(k)=>({jwks:new jse(k.keys),servicePlans:k.servicePlans})})}catch(k){if(k instanceof Vse&&k.responseCode===400&&k.request.name===`${this.constructor.name}.fetchJwks`)throw new Hse(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:E,servicePlans:T}=S;if(z)f.servicePlans=T;return E}async fetchJwks({clientid:o,app_tid:f,azp:h,azp_app_tid:y,clientCertificatePem:x},{correlationId:z,extractHeaders:C}){let S=(await this.getOpenIDConfiguration({correlationId:z})).jwks_uri,E=this.buildRequest({method:"GET",headers:{[Qse]:o}});if(f!=null)E.headers[Jse]=f;if(h!=null)E.headers[Zse]=h;if(y!=null)E.headers[Yse]=y;if(x!=null)E.headers[Xse]=x;return Wse(S,E,{requestName:`${this.constructor.name}.fetchJwks`,correlationId:z,extractHeaders:C})}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 du(o).appTid??null;return super.fetchJwtBearerToken(o,{...f,app_tid:h})}async _getIdToken(o,f={}){if(o.idType==="app")throw new sD("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=aD({ias_iss:o.issuer,app_tid:o.appTid||"",jti:o.payload.jti}),y=await this.idTokenCache.get(h);if(y)if(new du(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.#i(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 Mse(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 sD(`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}#n(o){return this.hasProofTokenEnabled()&&o.audiences.length>1}#i(o){return new ti({...this.credentials,url:ti.getSafeUrlFromTokenIssuer(o,this.credentials.domains)},this.config)}static getSafeUrlFromTokenIssuer=function(o,f=[]){let h=o?.issuer;if(!h)throw new Fse(o);let y=h.startsWith(Kb)?h:`${Kb}${h}`;try{new URL(y)}catch(z){throw new Use(o,z)}let x=y.substring(Kb.length);for(let z of f){let C=`^[a-zA-Z0-9-]{1,63}\\.${Kse(z)}$`;if(x===z||x.match(new RegExp(C)))return y}throw new $se(o,h,f)};static validateTokenOwnership(o,f){let h=o.payload.cnf?.[tae];if(!h)throw new Gb(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 Gb(o,f,"x5t validation failed because x5t thumbprint could not be calculated from client certificate.")}if(h!==y)throw new Gb(o,f,"x5t thumbprint did not match the thumbprint of the provided client certificate.")}static buildServiceConfiguration(o){if(o.idTokenCache??=ti.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={...ti.DEFAULT_ID_TOKEN_CACHE_CONFIG,...o.idTokenCache,enabled:!0};return o}}cD.exports=ti});var Wb=i(function(TPe,uD){var nae=lu();class lD extends nae{}uD.exports=lD});var yf=i(function(kPe,pD){var iae=ei(),sae=Nb(),Jb=Wb(),aae=$b(),cae=cf(),lae=Rb(),{getLogger:uae}=Rn(),dae=Oi(),pae=In(),Zb=uae("XsaService.js");class dD extends dae{constructor(o,f){super(o,f)}async createSecurityContext(o,f={}){if(typeof o==="string")o=new Jb(o);else if(o instanceof pae&&!(o instanceof Jb))o=new Jb(o.jwt,{header:o.header,payload:o.payload});if(iae.buildContextConfig(f),f.skipValidation!==!0&&this.config.validation.enabled!==!1)await this.validateToken(o,f);let h=new sae(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 Zb.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 cae)return Zb.info("JWKS did not contain kid."),this.#e(o,h);else throw y}}#e(o,f){if(!f)throw new lae;else return Zb.info("Validating token signature with verificationkey from service configuration."),aae.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}}pD.exports=dD});var Yb=i(function(OPe,hD){var fae=lu();class fD extends fae{}hD.exports=fD});var Xb=i(function(IPe,gD){var hae=ei(),mae=jb(),gae=In(),pu=Yb(),yae=Oi();class mD extends yae{constructor(o,f){super(o,f)}async createSecurityContext(o,f={}){if(typeof o==="string")o=new pu(o);else if(o instanceof gae&&!(o instanceof pu))o=new pu(o.jwt,{header:o.header,payload:o.payload});if(hae.buildContextConfig(f),f.skipValidation!==!0&&this.config.validation.enabled!==!1)await this.validateToken(o,f);let h=new mae(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 pu))o=new pu(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}.`))}}gD.exports=mD});var bD=i(function(RPe,yD){var bae=Ql(),vae=Os(),xae=ln(),{getLogger:_ae}=Rn(),zae=_ae("XssecPassportStrategy.js");class Qb{services;reqProperty;constructor(o,f="securityContext"){this.name="JWT",this.services=o,this.reqProperty=f}async authenticate(o,f={}){try{let h=await bae(this.services,{req:o});if(f.scope){if(typeof h.checkScope!=="function")return this.error(new vae("XssecPassportStrategy was configured with scope but the authentication was performed via a Service whose SecurityContext does not support checkLocalScope."));if(![f.scope].flatMap((z)=>z).some((z)=>h.checkLocalScope(z)))return this.fail("Token is missing required scope.",403)}let y=Qb.#e(h.token);return o[this.reqProperty]=h,o.tokenInfo=h.token,this.success(y,h)}catch(h){if(o.xssecError=h,h instanceof xae)return zae.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}]}}}yD.exports=Qb});var xD=i(function(APe,vD){var Cae=Ka(),wae=Oi(),Sae=yf(),Eae=Xb();vD.exports=Tae;function Tae(o,f){if(o.xsappname&&o.uaadomain)return new wae(o,f);else if(o.xsappname&&o.uaadomain==null)return new Sae(o,f);else if(o.xsappname==null&&o.uaadomain)return new Eae(o,f);else return new Cae(o,f)}});var tv=i(function(PPe,zD){var kae=Ql(),ev=Os(),{getLogger:Oae}=Rn(),Iae=Oi(),Rae=Ka(),Aae=Ka(),Pae=xD(),Dae=ln(),Bae=yf(),_D=Oae("createSecurityContextV3.js");async function Lae(o,f,h,y){if(typeof h==="function")y=h,h=null;if(y==null||typeof y!=="function")throw new ev("The callback parameter must be a function.");let x;try{if(f==null)throw new ev("The configParameter parameter must not be null or undefined.");else if(o==null)throw new ev("The jwt parameter must not be null or undefined.");let z=Nae(f,o),C=jae(f),w=Mae(z.credentials,h,C);x=await kae(w,z)}catch(z){if(z instanceof Dae)return y(z,null,{isValid:()=>!1,getErrorObject:()=>z});return y(z)}return y(null,x,x.token)}function Nae(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 jae(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)_D.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 Mae(o,f,h){let y=Array.isArray(o)?o:[o];if(qae(y),f)_D.info(`forceType === ${f}. Creating ${f} service(s) from credentials.`);switch(f){case"XSUAA":return y.map((x)=>new Iae(x,h));case"XSA":return y.map((x)=>new Bae(x,h));case"IAS":return y.map((x)=>new Rae(x,h));case"UAA":return y.map((x)=>new Aae(x,h));case null:case void 0:default:return y.map((x)=>Pae(x,h))}}function qae(o){if(process.env.XSAPPNAME)for(let f of o)f.xsappname=process.env.XSAPPNAME}zD.exports=Lae});var wD=i(function(DPe,CD){var rv=Ka(),ov=Oi();async function Fae(o,f,h,y,x){if(typeof y==="function")x=y,y=null;let z=f.credentials??f,C=f.type?.toUpperCase()==="IAS"?new rv(z):new ov(z),w={authorities:h,correlationId:f.correlationId,resource:f.resource,scope:f.scopes,tenant:o,timeout:f.timeout,app_tid:y};try{let S=await C.fetchClientCredentialsToken(w);return x(null,S.access_token,S)}catch(S){return x(S)}}async function Uae(o,f,h,y){let x=f.credentials??f,z=f.type?.toUpperCase()==="IAS"?new rv(x):new ov(x),C={authorities:h,correlationId:f.correlationId,resource:f.resource,scope:f.scopes,tenant:o,timeout:f.timeout};try{let w=await z.fetchPasswordToken(f.username,f.password,C);return y(null,f.type?.toUpperCase()==="IAS"?w.id_token:w.access_token,w)}catch(w){return y(w)}}async function $ae(o,f,h,y,x,z,C){if(typeof z==="function")C=z,z=null;let w=f.credentials??f,S=f.type?.toUpperCase()==="IAS"?new rv(w):new ov(w),E={authorities:h,correlationId:f.correlationId,resource:f.resource,scope:y??f.scopes,tenant:x,timeout:f.timeout,app_tid:z,zid:z};try{let T=await S.fetchJwtBearerToken(o,E);return C(null,f.type?.toUpperCase()==="IAS"?T.id_token:T.access_token,T)}catch(T){return C(T)}}CD.exports={requestClientCredentialsToken:Fae,requestPasswordUserToken:Uae,requestUserToken:$ae}});var nv=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 ED=i(function(LPe,SD){var Vae=tv(),{getLogger:Hae}=Rn(),{FWD_CLIENT_CERT_HEADER:Gae}=nv(),bf=Hae("XssecPassportStrategyV3.js");function xf(o,f){this.options=o,this.name="JWT",this._forceType=f}function vf(o){let f=Error(o);this.getErrorObject=function(){return f}}xf.prototype.authenticate=function(o,f){var h=o.headers.authorization;let y=f;if(!h)return bf.debug("Missing Authorization header"),o.tokenInfo=new vf("Missing Authorization header"),this.fail(401);var x=h.split(" ");if(x.length<2)return bf.debug("Invalid Authorization header format"),o.tokenInfo=new vf("Invalid Authorization header format"),this.fail(400);var z=x[0],C=x[1];if(z.toLowerCase()!=="bearer")return bf.debug("Authorization header is not a Bearer token"),o.tokenInfo=new vf("Authorization header is not a Bearer token"),this.fail(401);let w=o.headers["x-correlationid"]||o.headers["x-vcap-request-id"],S=o.headers[Gae];try{let O=function(I,A,j){if(o.tokenInfo=j,I){if(!o.tokenInfo)o.tokenInfo=new vf(I.toString());return I.statuscode?E.fail(I.statuscode,I):E.error(I)}if(y&&y.scope){var P=Array.isArray(y.scope)?y.scope:[y.scope];for(var F of P)if(!A.checkScope(E.options.xsappname+"."+F))return E.fail(403)}var q=A.getLogonName(),W=A.getGivenName(),ee=A.getFamilyName(),te=A.getEmail(),le=!q?{}:{id:q,name:{givenName:W,familyName:ee},emails:[{value:te}]};E.success(le,A)};var E=this,T=this._forceType?this._forceType:O,k=this._forceType?O:void 0;let R={...f,credentials:this.options,correlationId:w};if(S)R.x509Certificate=S;Vae(C,R,T,k)}catch(O){bf.error("JWT verification error: ",O),this.error(O)}};xf.JWTStrategy=xf;SD.exports=xf});var kD=i(function(NPe,TD){var Kae=tv(),Wae=wD(),Jae=nv(),Zae=In(),Yae=ED();TD.exports={createSecurityContext:Kae,requests:Wae,constants:Jae,TokenInfo:Zae,JWTStrategy:Yae}});var ID=i(function(jPe,OD){OD.exports={}});var AD=i(function(MPe,RD){var Xae=Symbol("XSSEC_SECURITY_CONTEXT");RD.exports=Xae});var _f=i(function(qPe,PD){var Qae=Ql(),ece=ei(),tce=Bb(),rce=eu(),oce=Nb(),nce=jb(),ice=ff(),sce=Ka(),ace=Oi(),cce=yf(),lce=Xb(),uce=bD(),dce=In(),pce=hf(),fce=lu(),hce=Wb(),mce=Yb(),gce=Is(),yce=un(),bce=kD(),vce=ID(),xce=AD(),_ce=Hb();PD.exports={createSecurityContext:Qae,SecurityContext:ece,IdentityServiceSecurityContext:tce,XsuaaSecurityContext:rce,XsaSecurityContext:oce,UaaSecurityContext:nce,Service:ice,IdentityService:sce,XsuaaService:ace,XsaService:cce,UaaService:lce,XssecPassportStrategy:uce,Token:dce,IdentityServiceToken:pce,XsuaaToken:fce,XsaToken:hce,UaaToken:mce,errors:gce,constants:yce,v3:bce,Types:vce,SECURITY_CONTEXT:xce,XsuaaLegacyExtension:_ce}});var iv=i(function(FPe,DD){var zce=xc();DD.exports=function(o,f){f=f||{};var h=zce.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(z){}if(f.complete===!0)return{header:h.header,payload:y,signature:h.signature};return y}});var fu=i(function(UPe,BD){var zf=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};zf.prototype=Object.create(Error.prototype);zf.prototype.constructor=zf;BD.exports=zf});var sv=i(function($Pe,ND){var LD=fu(),Cf=function(o,f){LD.call(this,o),this.name="NotBeforeError",this.date=f};Cf.prototype=Object.create(LD.prototype);Cf.prototype.constructor=Cf;ND.exports=Cf});var av=i(function(VPe,MD){var jD=fu(),wf=function(o,f){jD.call(this,o),this.name="TokenExpiredError",this.expiredAt=f};wf.prototype=Object.create(jD.prototype);wf.prototype.constructor=wf;MD.exports=wf});var cv=i(function(HPe,qD){var Cce=mm();qD.exports=function(o,f){var h=f||Math.floor(Date.now()/1000);if(typeof o==="string"){var y=Cce(o);if(typeof y>"u")return;return Math.floor(h+y/1000)}else if(typeof o==="number")return h+o;else return}});var Wa=i(function(GPe,FD){var wce=Number.MAX_SAFE_INTEGER||9007199254740991,Sce=["major","premajor","minor","preminor","patch","prepatch","prerelease"];FD.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:wce,RELEASE_TYPES:Sce,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var hu=i(function(KPe,UD){var Ece=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...o)=>console.error("SEMVER",...o):()=>{};UD.exports=Ece});var Ja=i(function(Pn,$D){var{MAX_SAFE_COMPONENT_LENGTH:lv,MAX_SAFE_BUILD_LENGTH:Tce,MAX_LENGTH:kce}=Wa(),Oce=hu();Pn=$D.exports={};var Ice=Pn.re=[],Rce=Pn.safeRe=[],Oe=Pn.src=[],Ace=Pn.safeSrc=[],Re=Pn.t={},Pce=0,uv="[a-zA-Z0-9-]",Dce=[["\\s",1],["\\d",kce],[uv,Tce]],Bce=(o)=>{for(let[f,h]of Dce)o=o.split(`${f}*`).join(`${f}{0,${h}}`).split(`${f}+`).join(`${f}{1,${h}}`);return o},Je=(o,f,h)=>{let y=Bce(f),x=Pce++;Oce(o,x,f),Re[o]=x,Oe[x]=f,Ace[x]=y,Ice[x]=new RegExp(f,h?"g":void 0),Rce[x]=new RegExp(y,h?"g":void 0)};Je("NUMERICIDENTIFIER","0|[1-9]\\d*");Je("NUMERICIDENTIFIERLOOSE","\\d+");Je("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${uv}*`);Je("MAINVERSION",`(${Oe[Re.NUMERICIDENTIFIER]})\\.(${Oe[Re.NUMERICIDENTIFIER]})\\.(${Oe[Re.NUMERICIDENTIFIER]})`);Je("MAINVERSIONLOOSE",`(${Oe[Re.NUMERICIDENTIFIERLOOSE]})\\.(${Oe[Re.NUMERICIDENTIFIERLOOSE]})\\.(${Oe[Re.NUMERICIDENTIFIERLOOSE]})`);Je("PRERELEASEIDENTIFIER",`(?:${Oe[Re.NONNUMERICIDENTIFIER]}|${Oe[Re.NUMERICIDENTIFIER]})`);Je("PRERELEASEIDENTIFIERLOOSE",`(?:${Oe[Re.NONNUMERICIDENTIFIER]}|${Oe[Re.NUMERICIDENTIFIERLOOSE]})`);Je("PRERELEASE",`(?:-(${Oe[Re.PRERELEASEIDENTIFIER]}(?:\\.${Oe[Re.PRERELEASEIDENTIFIER]})*))`);Je("PRERELEASELOOSE",`(?:-?(${Oe[Re.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${Oe[Re.PRERELEASEIDENTIFIERLOOSE]})*))`);Je("BUILDIDENTIFIER",`${uv}+`);Je("BUILD",`(?:\\+(${Oe[Re.BUILDIDENTIFIER]}(?:\\.${Oe[Re.BUILDIDENTIFIER]})*))`);Je("FULLPLAIN",`v?${Oe[Re.MAINVERSION]}${Oe[Re.PRERELEASE]}?${Oe[Re.BUILD]}?`);Je("FULL",`^${Oe[Re.FULLPLAIN]}$`);Je("LOOSEPLAIN",`[v=\\s]*${Oe[Re.MAINVERSIONLOOSE]}${Oe[Re.PRERELEASELOOSE]}?${Oe[Re.BUILD]}?`);Je("LOOSE",`^${Oe[Re.LOOSEPLAIN]}$`);Je("GTLT","((?:<|>)?=?)");Je("XRANGEIDENTIFIERLOOSE",`${Oe[Re.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Je("XRANGEIDENTIFIER",`${Oe[Re.NUMERICIDENTIFIER]}|x|X|\\*`);Je("XRANGEPLAIN",`[v=\\s]*(${Oe[Re.XRANGEIDENTIFIER]})(?:\\.(${Oe[Re.XRANGEIDENTIFIER]})(?:\\.(${Oe[Re.XRANGEIDENTIFIER]})(?:${Oe[Re.PRERELEASE]})?${Oe[Re.BUILD]}?)?)?`);Je("XRANGEPLAINLOOSE",`[v=\\s]*(${Oe[Re.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Oe[Re.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Oe[Re.XRANGEIDENTIFIERLOOSE]})(?:${Oe[Re.PRERELEASELOOSE]})?${Oe[Re.BUILD]}?)?)?`);Je("XRANGE",`^${Oe[Re.GTLT]}\\s*${Oe[Re.XRANGEPLAIN]}$`);Je("XRANGELOOSE",`^${Oe[Re.GTLT]}\\s*${Oe[Re.XRANGEPLAINLOOSE]}$`);Je("COERCEPLAIN",`(^|[^\\d])(\\d{1,${lv}})(?:\\.(\\d{1,${lv}}))?(?:\\.(\\d{1,${lv}}))?`);Je("COERCE",`${Oe[Re.COERCEPLAIN]}(?:$|[^\\d])`);Je("COERCEFULL",Oe[Re.COERCEPLAIN]+`(?:${Oe[Re.PRERELEASE]})?(?:${Oe[Re.BUILD]})?(?:$|[^\\d])`);Je("COERCERTL",Oe[Re.COERCE],!0);Je("COERCERTLFULL",Oe[Re.COERCEFULL],!0);Je("LONETILDE","(?:~>?)");Je("TILDETRIM",`(\\s*)${Oe[Re.LONETILDE]}\\s+`,!0);Pn.tildeTrimReplace="$1~";Je("TILDE",`^${Oe[Re.LONETILDE]}${Oe[Re.XRANGEPLAIN]}$`);Je("TILDELOOSE",`^${Oe[Re.LONETILDE]}${Oe[Re.XRANGEPLAINLOOSE]}$`);Je("LONECARET","(?:\\^)");Je("CARETTRIM",`(\\s*)${Oe[Re.LONECARET]}\\s+`,!0);Pn.caretTrimReplace="$1^";Je("CARET",`^${Oe[Re.LONECARET]}${Oe[Re.XRANGEPLAIN]}$`);Je("CARETLOOSE",`^${Oe[Re.LONECARET]}${Oe[Re.XRANGEPLAINLOOSE]}$`);Je("COMPARATORLOOSE",`^${Oe[Re.GTLT]}\\s*(${Oe[Re.LOOSEPLAIN]})$|^$`);Je("COMPARATOR",`^${Oe[Re.GTLT]}\\s*(${Oe[Re.FULLPLAIN]})$|^$`);Je("COMPARATORTRIM",`(\\s*)${Oe[Re.GTLT]}\\s*(${Oe[Re.LOOSEPLAIN]}|${Oe[Re.XRANGEPLAIN]})`,!0);Pn.comparatorTrimReplace="$1$2$3";Je("HYPHENRANGE",`^\\s*(${Oe[Re.XRANGEPLAIN]})\\s+-\\s+(${Oe[Re.XRANGEPLAIN]})\\s*$`);Je("HYPHENRANGELOOSE",`^\\s*(${Oe[Re.XRANGEPLAINLOOSE]})\\s+-\\s+(${Oe[Re.XRANGEPLAINLOOSE]})\\s*$`);Je("STAR","(<|>)?=?\\s*\\*");Je("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Je("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Sf=i(function(WPe,VD){var Lce=Object.freeze({loose:!0}),Nce=Object.freeze({}),jce=(o)=>{if(!o)return Nce;if(typeof o!=="object")return Lce;return o};VD.exports=jce});var dv=i(function(JPe,KD){var HD=/^[0-9]+$/,GD=(o,f)=>{if(typeof o==="number"&&typeof f==="number")return o===f?0:o<f?-1:1;let h=HD.test(o),y=HD.test(f);if(h&&y)o=+o,f=+f;return o===f?0:h&&!y?-1:y&&!h?1:o<f?-1:1},Mce=(o,f)=>GD(f,o);KD.exports={compareIdentifiers:GD,rcompareIdentifiers:Mce}});var Br=i(function(ZPe,JD){var Ef=hu(),{MAX_LENGTH:WD,MAX_SAFE_INTEGER:Tf}=Wa(),{safeRe:kf,t:Of}=Ja(),qce=Sf(),{compareIdentifiers:pv}=dv(),Fce=(o,f)=>{let h=f.split(".");if(h.length>o.length)return!1;for(let y=0;y<h.length;y++)if(pv(o[y],h[y])!==0)return!1;return!0};class pn{constructor(o,f){if(f=qce(f),o instanceof pn)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>WD)throw TypeError(`version is longer than ${WD} characters`);Ef("SemVer",o,f),this.options=f,this.loose=!!f.loose,this.includePrerelease=!!f.includePrerelease;let h=o.trim().match(f.loose?kf[Of.LOOSE]:kf[Of.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(Ef("SemVer.compare",this.version,this.options,o),!(o instanceof pn)){if(typeof o==="string"&&o===this.version)return 0;o=new pn(o,this.options)}if(o.version===this.version)return 0;return this.compareMain(o)||this.comparePre(o)}compareMain(o){if(!(o instanceof pn))o=new pn(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 pn))o=new pn(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(Ef("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 pv(h,y)}while(++f)}compareBuild(o){if(!(o instanceof pn))o=new pn(o,this.options);let f=0;do{let h=this.build[f],y=o.build[f];if(Ef("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 pv(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?kf[Of.PRERELEASELOOSE]:kf[Of.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(Fce(this.prerelease,f)){let z=this.prerelease[f.split(".").length];if(isNaN(z))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}}JD.exports=pn});var Ri=i(function(YPe,YD){var ZD=Br(),Uce=(o,f,h=!1)=>{if(o instanceof ZD)return o;try{return new ZD(o,f)}catch(y){if(!h)return null;throw y}};YD.exports=Uce});var QD=i(function(XPe,XD){var $ce=Ri(),Vce=(o,f)=>{let h=$ce(o,f);return h?h.version:null};XD.exports=Vce});var tB=i(function(QPe,eB){var Hce=Ri(),Gce=(o,f)=>{let h=Hce(o.trim().replace(/^[=v]+/,""),f);return h?h.version:null};eB.exports=Gce});var nB=i(function(eDe,oB){var rB=Br(),Kce=(o,f,h,y,x)=>{if(typeof h==="string")x=y,y=h,h=void 0;try{return new rB(o instanceof rB?o.version:o,h).inc(f,y,x).version}catch(z){return null}};oB.exports=Kce});var aB=i(function(tDe,sB){var iB=Ri(),Wce=(o,f)=>{let h=iB(o,null,!0),y=iB(f,null,!0),x=h.compare(y);if(x===0)return null;let z=x>0,C=z?h:y,w=z?y:h,S=!!C.prerelease.length;if(!!w.prerelease.length&&!S){if(!w.patch&&!w.minor)return"major";if(w.compareMain(C)===0){if(w.minor&&!w.patch)return"minor";return"patch"}}let T=S?"pre":"";if(h.major!==y.major)return T+"major";if(h.minor!==y.minor)return T+"minor";if(h.patch!==y.patch)return T+"patch";return"prerelease"};sB.exports=Wce});var lB=i(function(rDe,cB){var Jce=Br(),Zce=(o,f)=>new Jce(o,f).major;cB.exports=Zce});var dB=i(function(oDe,uB){var Yce=Br(),Xce=(o,f)=>new Yce(o,f).minor;uB.exports=Xce});var fB=i(function(nDe,pB){var Qce=Br(),ele=(o,f)=>new Qce(o,f).patch;pB.exports=ele});var mB=i(function(iDe,hB){var tle=Ri(),rle=(o,f)=>{let h=tle(o,f);return h&&h.prerelease.length?h.prerelease:null};hB.exports=rle});var jo=i(function(sDe,yB){var gB=Br(),ole=(o,f,h)=>new gB(o,h).compare(new gB(f,h));yB.exports=ole});var vB=i(function(aDe,bB){var nle=jo(),ile=(o,f,h)=>nle(f,o,h);bB.exports=ile});var _B=i(function(cDe,xB){var sle=jo(),ale=(o,f)=>sle(o,f,!0);xB.exports=ale});var If=i(function(lDe,CB){var zB=Br(),cle=(o,f,h)=>{let y=new zB(o,h),x=new zB(f,h);return y.compare(x)||y.compareBuild(x)};CB.exports=cle});var SB=i(function(uDe,wB){var lle=If(),ule=(o,f)=>o.sort((h,y)=>lle(h,y,f));wB.exports=ule});var TB=i(function(dDe,EB){var dle=If(),ple=(o,f)=>o.sort((h,y)=>dle(y,h,f));EB.exports=ple});var mu=i(function(pDe,kB){var fle=jo(),hle=(o,f,h)=>fle(o,f,h)>0;kB.exports=hle});var Rf=i(function(fDe,OB){var mle=jo(),gle=(o,f,h)=>mle(o,f,h)<0;OB.exports=gle});var fv=i(function(hDe,IB){var yle=jo(),ble=(o,f,h)=>yle(o,f,h)===0;IB.exports=ble});var hv=i(function(mDe,RB){var vle=jo(),xle=(o,f,h)=>vle(o,f,h)!==0;RB.exports=xle});var Af=i(function(gDe,AB){var _le=jo(),zle=(o,f,h)=>_le(o,f,h)>=0;AB.exports=zle});var Pf=i(function(yDe,PB){var Cle=jo(),wle=(o,f,h)=>Cle(o,f,h)<=0;PB.exports=wle});var mv=i(function(bDe,DB){var Sle=fv(),Ele=hv(),Tle=mu(),kle=Af(),Ole=Rf(),Ile=Pf(),Rle=(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 Sle(o,h,y);case"!=":return Ele(o,h,y);case">":return Tle(o,h,y);case">=":return kle(o,h,y);case"<":return Ole(o,h,y);case"<=":return Ile(o,h,y);default:throw TypeError(`Invalid operator: ${f}`)}};DB.exports=Rle});var LB=i(function(vDe,BB){var Ale=Br(),Ple=Ri(),{safeRe:Df,t:Bf}=Ja(),Dle=(o,f)=>{if(o instanceof Ale)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?Df[Bf.COERCEFULL]:Df[Bf.COERCE]);else{let S=f.includePrerelease?Df[Bf.COERCERTLFULL]:Df[Bf.COERCERTL],E;while((E=S.exec(o))&&(!h||h.index+h[0].length!==o.length)){if(!h||E.index+E[0].length!==h.index+h[0].length)h=E;S.lastIndex=E.index+E[1].length+E[2].length}S.lastIndex=-1}if(h===null)return null;let y=h[2],x=h[3]||"0",z=h[4]||"0",C=f.includePrerelease&&h[5]?`-${h[5]}`:"",w=f.includePrerelease&&h[6]?`+${h[6]}`:"";return Ple(`${y}.${x}.${z}${C}${w}`,f)};BB.exports=Dle});var jB=i(function(xDe,NB){var Ble=Ri(),Lle=Wa(),Nle=Br(),jle=(o,f,h)=>{if(!Lle.RELEASE_TYPES.includes(f))return null;let y=Mle(o,h);return y&&qle(y,f)},Mle=(o,f)=>{let h=o instanceof Nle?o.version:o;return Ble(h,f)},qle=(o,f)=>{if(Fle(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()},Fle=(o)=>o.startsWith("pre");NB.exports=jle});var FB=i(function(_De,qB){class MB{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}}qB.exports=MB});var Mo=i(function(zDe,HB){var Ule=/\s+/g;class gu{constructor(o,f){if(f=Vle(f),o instanceof gu)if(o.loose===!!f.loose&&o.includePrerelease===!!f.includePrerelease)return o;else return new gu(o.raw,f);if(o instanceof gv)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(Ule," "),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)=>!$B(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&&Qle(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(Xle,"");let h=((this.options.includePrerelease&&Zle)|(this.options.loose&&Yle))+":"+o,y=UB.get(h);if(y)return y;let x=this.options.loose,z=x?Qr[Lr.HYPHENRANGELOOSE]:Qr[Lr.HYPHENRANGE];o=o.replace(z,uue(this.options.includePrerelease)),$t("hyphen replace",o),o=o.replace(Qr[Lr.COMPARATORTRIM],Kle),$t("comparator trim",o),o=o.replace(Qr[Lr.TILDETRIM],Wle),$t("tilde trim",o),o=o.replace(Qr[Lr.CARETTRIM],Jle),$t("caret trim",o);let C=o.split(" ").map((T)=>eue(T,this.options)).join(" ").split(/\s+/).map((T)=>lue(T,this.options));if(x)C=C.filter((T)=>($t("loose invalid filter",T,this.options),!!T.match(Qr[Lr.COMPARATORLOOSE])));$t("range list",C);let w=new Map,S=C.map((T)=>new gv(T,this.options));for(let T of S){if($B(T))return[T];w.set(T.value,T)}if(w.size>1&&w.has(""))w.delete("");let E=[...w.values()];return UB.set(h,E),E}intersects(o,f){if(!(o instanceof gu))throw TypeError("a Range is required");return this.set.some((h)=>VB(h,f)&&o.set.some((y)=>VB(y,f)&&h.every((x)=>y.every((z)=>x.intersects(z,f)))))}test(o){if(!o)return!1;if(typeof o==="string")try{o=new Hle(o,this.options)}catch(f){return!1}for(let f=0;f<this.set.length;f++)if(due(this.set[f],o,this.options))return!0;return!1}}HB.exports=gu;var $le=FB(),UB=new $le,Vle=Sf(),gv=yu(),$t=hu(),Hle=Br(),{safeRe:Qr,src:Gle,t:Lr,comparatorTrimReplace:Kle,tildeTrimReplace:Wle,caretTrimReplace:Jle}=Ja(),{FLAG_INCLUDE_PRERELEASE:Zle,FLAG_LOOSE:Yle}=Wa(),Xle=new RegExp(Gle[Lr.BUILD],"g"),$B=(o)=>o.value==="<0.0.0-0",Qle=(o)=>o.value==="",VB=(o,f)=>{let h=!0,y=o.slice(),x=y.pop();while(h&&y.length)h=y.every((z)=>x.intersects(z,f)),x=y.pop();return h},eue=(o,f)=>(o=o.replace(Qr[Lr.BUILD],""),$t("comp",o,f),o=nue(o,f),$t("caret",o),o=rue(o,f),$t("tildes",o),o=sue(o,f),$t("xrange",o),o=cue(o,f),$t("stars",o),o),yr=(o)=>!o||o.toLowerCase()==="x"||o==="*",tue=(o,f,h)=>yr(o)&&!yr(f)||yr(f)&&h&&!yr(h),rue=(o,f)=>o.trim().split(/\s+/).map((h)=>oue(h,f)).join(" "),oue=(o,f)=>{let h=f.loose?Qr[Lr.TILDELOOSE]:Qr[Lr.TILDE],y=f.includePrerelease?"-0":"";return o.replace(h,(x,z,C,w,S)=>{$t("tilde",o,x,z,C,w,S);let E;if(yr(z))E="";else if(yr(C))E=`>=${z}.0.0${y} <${+z+1}.0.0-0`;else if(yr(w))E=`>=${z}.${C}.0${y} <${z}.${+C+1}.0-0`;else if(S)$t("replaceTilde pr",S),E=`>=${z}.${C}.${w}-${S} <${z}.${+C+1}.0-0`;else E=`>=${z}.${C}.${w} <${z}.${+C+1}.0-0`;return $t("tilde return",E),E})},nue=(o,f)=>o.trim().split(/\s+/).map((h)=>iue(h,f)).join(" "),iue=(o,f)=>{$t("caret",o,f);let h=f.loose?Qr[Lr.CARETLOOSE]:Qr[Lr.CARET],y=f.includePrerelease?"-0":"";return o.replace(h,(x,z,C,w,S)=>{$t("caret",o,x,z,C,w,S);let E;if(yr(z))E="";else if(yr(C))E=`>=${z}.0.0${y} <${+z+1}.0.0-0`;else if(yr(w))if(z==="0")E=`>=${z}.${C}.0${y} <${z}.${+C+1}.0-0`;else E=`>=${z}.${C}.0${y} <${+z+1}.0.0-0`;else if(S)if($t("replaceCaret pr",S),z==="0")if(C==="0")E=`>=${z}.${C}.${w}-${S} <${z}.${C}.${+w+1}-0`;else E=`>=${z}.${C}.${w}-${S} <${z}.${+C+1}.0-0`;else E=`>=${z}.${C}.${w}-${S} <${+z+1}.0.0-0`;else if($t("no pr"),z==="0")if(C==="0")E=`>=${z}.${C}.${w} <${z}.${C}.${+w+1}-0`;else E=`>=${z}.${C}.${w} <${z}.${+C+1}.0-0`;else E=`>=${z}.${C}.${w} <${+z+1}.0.0-0`;return $t("caret return",E),E})},sue=(o,f)=>($t("replaceXRanges",o,f),o.split(/\s+/).map((h)=>aue(h,f)).join(" ")),aue=(o,f)=>{o=o.trim();let h=f.loose?Qr[Lr.XRANGELOOSE]:Qr[Lr.XRANGE];return o.replace(h,(y,x,z,C,w,S)=>{if($t("xRange",o,y,x,z,C,w,S),tue(z,C,w))return o;let E=yr(z),T=E||yr(C),k=T||yr(w),O=k;if(x==="="&&O)x="";if(S=f.includePrerelease?"-0":"",E)if(x===">"||x==="<")y="<0.0.0-0";else y="*";else if(x&&O){if(T)C=0;if(w=0,x===">")if(x=">=",T)z=+z+1,C=0,w=0;else C=+C+1,w=0;else if(x==="<=")if(x="<",T)z=+z+1;else C=+C+1;if(x==="<")S="-0";y=`${x+z}.${C}.${w}${S}`}else if(T)y=`>=${z}.0.0${S} <${+z+1}.0.0-0`;else if(k)y=`>=${z}.${C}.0${S} <${z}.${+C+1}.0-0`;return $t("xRange return",y),y})},cue=(o,f)=>($t("replaceStars",o,f),o.trim().replace(Qr[Lr.STAR],"")),lue=(o,f)=>($t("replaceGTE0",o,f),o.trim().replace(Qr[f.includePrerelease?Lr.GTE0PRE:Lr.GTE0],"")),uue=(o)=>(f,h,y,x,z,C,w,S,E,T,k,O)=>{if(yr(y))h="";else if(yr(x))h=`>=${y}.0.0${o?"-0":""}`;else if(yr(z))h=`>=${y}.${x}.0${o?"-0":""}`;else if(C)h=`>=${h}`;else h=`>=${h}${o?"-0":""}`;if(yr(E))S="";else if(yr(T))S=`<${+E+1}.0.0-0`;else if(yr(k))S=`<${E}.${+T+1}.0-0`;else if(O)S=`<=${E}.${T}.${k}-${O}`;else if(o)S=`<${E}.${T}.${+k+1}-0`;else S=`<=${S}`;return`${h} ${S}`.trim()},due=(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($t(o[y].semver),o[y].semver===gv.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 yu=i(function(CDe,YB){var bu=Symbol("SemVer ANY");class Lf{static get ANY(){return bu}constructor(o,f){if(f=GB(f),o instanceof Lf)if(o.loose===!!f.loose)return o;else o=o.value;if(o=o.trim().split(/\s+/).join(" "),bv("comparator",o,f),this.options=f,this.loose=!!f.loose,this.parse(o),this.semver===bu)this.value="";else this.value=this.operator+this.semver.version;bv("comp",this)}parse(o){let f=this.options.loose?KB[WB.COMPARATORLOOSE]:KB[WB.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=bu;else this.semver=new JB(h[2],this.options.loose)}toString(){return this.value}test(o){if(bv("Comparator.test",o,this.options.loose),this.semver===bu||o===bu)return!0;if(typeof o==="string")try{o=new JB(o,this.options)}catch(f){return!1}return yv(o,this.operator,this.semver,this.options)}intersects(o,f){if(!(o instanceof Lf))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new ZB(o.value,f).test(this.value)}else if(o.operator===""){if(o.value==="")return!0;return new ZB(this.value,f).test(o.semver)}if(f=GB(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(yv(this.semver,"<",o.semver,f)&&this.operator.startsWith(">")&&o.operator.startsWith("<"))return!0;if(yv(this.semver,">",o.semver,f)&&this.operator.startsWith("<")&&o.operator.startsWith(">"))return!0;return!1}}YB.exports=Lf;var GB=Sf(),{safeRe:KB,t:WB}=Ja(),yv=mv(),bv=hu(),JB=Br(),ZB=Mo()});var vu=i(function(wDe,XB){var pue=Mo(),fue=(o,f,h)=>{try{f=new pue(f,h)}catch(y){return!1}return f.test(o)};XB.exports=fue});var eL=i(function(SDe,QB){var hue=Mo(),mue=(o,f)=>new hue(o,f).set.map((h)=>h.map((y)=>y.value).join(" ").trim().split(" "));QB.exports=mue});var rL=i(function(EDe,tL){var gue=Br(),yue=Mo(),bue=(o,f,h)=>{let y=null,x=null,z=null;try{z=new yue(f,h)}catch(C){return null}return o.forEach((C)=>{if(z.test(C)){if(!y||x.compare(C)===-1)y=C,x=new gue(y,h)}}),y};tL.exports=bue});var nL=i(function(TDe,oL){var vue=Br(),xue=Mo(),_ue=(o,f,h)=>{let y=null,x=null,z=null;try{z=new xue(f,h)}catch(C){return null}return o.forEach((C)=>{if(z.test(C)){if(!y||x.compare(C)===1)y=C,x=new vue(y,h)}}),y};oL.exports=_ue});var aL=i(function(kDe,sL){var vv=Br(),zue=Mo(),iL=mu(),Cue=(o,f)=>{o=new zue(o,f);let h=new vv("0.0.0");if(o.test(h))return h;if(h=new vv("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],z=null;if(x.forEach((C)=>{let w=new vv(C.semver.version);switch(C.operator){case">":if(w.prerelease.length===0)w.patch++;else w.prerelease.push(0);w.raw=w.format();case"":case">=":if(!z||iL(w,z))z=w;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${C.operator}`)}}),z&&(!h||iL(h,z)))h=z}if(h&&o.test(h))return h;return null};sL.exports=Cue});var lL=i(function(ODe,cL){var wue=Mo(),Sue=(o,f)=>{try{return new wue(o,f).range||"*"}catch(h){return null}};cL.exports=Sue});var Nf=i(function(IDe,fL){var Eue=Br(),pL=yu(),{ANY:Tue}=pL,kue=Mo(),Oue=vu(),uL=mu(),dL=Rf(),Iue=Pf(),Rue=Af(),Aue=(o,f,h,y)=>{o=new Eue(o,y),f=new kue(f,y);let x,z,C,w,S;switch(h){case">":x=uL,z=Iue,C=dL,w=">",S=">=";break;case"<":x=dL,z=Rue,C=uL,w="<",S="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(Oue(o,f,y))return!1;for(let E=0;E<f.set.length;++E){let T=f.set[E],k=null,O=null;if(T.forEach((R)=>{if(R.semver===Tue)R=new pL(">=0.0.0");if(k=k||R,O=O||R,x(R.semver,k.semver,y))k=R;else if(C(R.semver,O.semver,y))O=R}),k.operator===w||k.operator===S)return!1;if((!O.operator||O.operator===w)&&z(o,O.semver))return!1;else if(O.operator===S&&C(o,O.semver))return!1}return!0};fL.exports=Aue});var mL=i(function(RDe,hL){var Pue=Nf(),Due=(o,f,h)=>Pue(o,f,">",h);hL.exports=Due});var yL=i(function(ADe,gL){var Bue=Nf(),Lue=(o,f,h)=>Bue(o,f,"<",h);gL.exports=Lue});var xL=i(function(PDe,vL){var bL=Mo(),Nue=(o,f,h)=>(o=new bL(o,h),f=new bL(f,h),o.intersects(f,h));vL.exports=Nue});var zL=i(function(DDe,_L){var jue=vu(),Mue=jo();_L.exports=(o,f,h)=>{let y=[],x=null,z=null,C=o.sort((T,k)=>Mue(T,k,h));for(let T of C)if(jue(T,f,h)){if(z=T,!x)x=T}else{if(z)y.push([x,z]);z=null,x=null}if(x)y.push([x,null]);let w=[];for(let[T,k]of y)if(T===k)w.push(T);else if(!k&&T===C[0])w.push("*");else if(!k)w.push(`>=${T}`);else if(T===C[0])w.push(`<=${k}`);else w.push(`${T} - ${k}`);let S=w.join(" || "),E=typeof f.raw==="string"?f.raw:String(f);return S.length<E.length?S:f}});var kL=i(function(BDe,TL){var CL=Mo(),zv=yu(),{ANY:xv}=zv,_v=vu(),Cv=jo(),que=(o,f,h={})=>{if(o===f)return!0;o=new CL(o,h),f=new CL(f,h);let y=!1;e:for(let x of o.set){for(let z of f.set){let C=Uue(x,z,h);if(y=y||C!==null,C)continue e}if(y)return!1}return!0},Fue=[new zv(">=0.0.0-0")],wL=[new zv(">=0.0.0")],Uue=(o,f,h)=>{if(o===f)return!0;if(o.length===1&&o[0].semver===xv)if(f.length===1&&f[0].semver===xv)return!0;else if(h.includePrerelease)o=Fue;else o=wL;if(f.length===1&&f[0].semver===xv)if(h.includePrerelease)return!0;else f=wL;let y=new Set,x,z;for(let R of o)if(R.operator===">"||R.operator===">=")x=SL(x,R,h);else if(R.operator==="<"||R.operator==="<=")z=EL(z,R,h);else y.add(R.semver);if(y.size>1)return null;let C;if(x&&z){if(C=Cv(x.semver,z.semver,h),C>0)return null;else if(C===0&&(x.operator!==">="||z.operator!=="<="))return null}for(let R of y){if(x&&!_v(R,String(x),h))return null;if(z&&!_v(R,String(z),h))return null;for(let I of f)if(!_v(R,String(I),h))return!1;return!0}let w,S,E,T,k=z&&!h.includePrerelease&&z.semver.prerelease.length?z.semver:!1,O=x&&!h.includePrerelease&&x.semver.prerelease.length?x.semver:!1;if(k&&k.prerelease.length===1&&z.operator==="<"&&k.prerelease[0]===0)k=!1;for(let R of f){if(T=T||R.operator===">"||R.operator===">=",E=E||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(w=SL(x,R,h),w===R&&w!==x)return!1}else if(x.operator===">="&&!R.test(x.semver))return!1}if(z){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(S=EL(z,R,h),S===R&&S!==z)return!1}else if(z.operator==="<="&&!R.test(z.semver))return!1}if(!R.operator&&(z||x)&&C!==0)return!1}if(x&&E&&!z&&C!==0)return!1;if(z&&T&&!x&&C!==0)return!1;if(O||k)return!1;return!0},SL=(o,f,h)=>{if(!o)return f;let y=Cv(o.semver,f.semver,h);return y>0?o:y<0?f:f.operator===">"&&o.operator===">="?f:o},EL=(o,f,h)=>{if(!o)return f;let y=Cv(o.semver,f.semver,h);return y<0?o:y>0?f:f.operator==="<"&&o.operator==="<="?f:o};TL.exports=que});var jf=i(function(LDe,RL){var wv=Ja(),OL=Wa(),$ue=Br(),IL=dv(),Vue=Ri(),Hue=QD(),Gue=tB(),Kue=nB(),Wue=aB(),Jue=lB(),Zue=dB(),Yue=fB(),Xue=mB(),Que=jo(),ede=vB(),tde=_B(),rde=If(),ode=SB(),nde=TB(),ide=mu(),sde=Rf(),ade=fv(),cde=hv(),lde=Af(),ude=Pf(),dde=mv(),pde=LB(),fde=jB(),hde=yu(),mde=Mo(),gde=vu(),yde=eL(),bde=rL(),vde=nL(),xde=aL(),_de=lL(),zde=Nf(),Cde=mL(),wde=yL(),Sde=xL(),Ede=zL(),Tde=kL();RL.exports={parse:Vue,valid:Hue,clean:Gue,inc:Kue,diff:Wue,major:Jue,minor:Zue,patch:Yue,prerelease:Xue,compare:Que,rcompare:ede,compareLoose:tde,compareBuild:rde,sort:ode,rsort:nde,gt:ide,lt:sde,eq:ade,neq:cde,gte:lde,lte:ude,cmp:dde,coerce:pde,truncate:fde,Comparator:hde,Range:mde,satisfies:gde,toComparators:yde,maxSatisfying:bde,minSatisfying:vde,minVersion:xde,validRange:_de,outside:zde,gtr:Cde,ltr:wde,intersects:Sde,simplifyRange:Ede,subset:Tde,SemVer:$ue,re:wv.re,src:wv.src,tokens:wv.t,SEMVER_SPEC_VERSION:OL.SEMVER_SPEC_VERSION,RELEASE_TYPES:OL.RELEASE_TYPES,compareIdentifiers:IL.compareIdentifiers,rcompareIdentifiers:IL.rcompareIdentifiers}});var PL=i(function(NDe,AL){var kde=jf();AL.exports=kde.satisfies(process.version,">=15.7.0")});var BL=i(function(jDe,DL){var Ode=jf();DL.exports=Ode.satisfies(process.version,">=16.9.0")});var Sv=i(function(MDe,LL){var Ide=PL(),Rde=BL(),Ade={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},Pde={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};LL.exports=function(o,f){if(!o||!f)return;let h=f.asymmetricKeyType;if(!h)return;let y=Ade[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(Ide)switch(h){case"ec":let x=f.asymmetricKeyDetails.namedCurve,z=Pde[o];if(x!==z)throw Error(`"alg" parameter "${o}" requires curve "${z}".`);break;case"rsa-pss":if(Rde){let C=parseInt(o.slice(-3),10),{hashAlgorithm:w,mgf1HashAlgorithm:S,saltLength:E}=f.asymmetricKeyDetails;if(w!==`sha${C}`||S!==w)throw Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${o}.`);if(E!==void 0&&E>C>>3)throw Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${o}.`)}break}}});var Ev=i(function(qDe,NL){var Dde=jf();NL.exports=Dde.satisfies(process.version,"^6.12.0 || >=8.0.0")});var qL=i(function(FDe,ML){var Mt=fu(),Bde=sv(),jL=av(),Lde=iv(),Nde=cv(),jde=Sv(),Mde=Ev(),qde=xc(),{KeyObject:Fde,createSecretKey:Ude,createPublicKey:$de}=c("crypto"),Tv=["RS256","RS384","RS512"],Vde=["ES256","ES384","ES512"],kv=["RS256","RS384","RS512"],Hde=["HS256","HS384","HS512"];if(Mde)Tv.splice(Tv.length,0,"PS256","PS384","PS512"),kv.splice(kv.length,0,"PS256","PS384","PS512");ML.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(T,k){if(T)throw T;return k};if(h.clockTimestamp&&typeof h.clockTimestamp!=="number")return x(new Mt("clockTimestamp must be a number"));if(h.nonce!==void 0&&(typeof h.nonce!=="string"||h.nonce.trim()===""))return x(new Mt("nonce must be a non-empty string"));if(h.allowInvalidAsymmetricKeyTypes!==void 0&&typeof h.allowInvalidAsymmetricKeyTypes!=="boolean")return x(new Mt("allowInvalidAsymmetricKeyTypes must be a boolean"));let z=h.clockTimestamp||Math.floor(Date.now()/1000);if(!o)return x(new Mt("jwt must be provided"));if(typeof o!=="string")return x(new Mt("jwt must be a string"));let C=o.split(".");if(C.length!==3)return x(new Mt("jwt malformed"));let w;try{w=Lde(o,{complete:!0})}catch(T){return x(T)}if(!w)return x(new Mt("invalid token"));let S=w.header,E;if(typeof f==="function"){if(!y)return x(new Mt("verify must be called asynchronous if secret or public key is provided as a callback"));E=f}else E=function(T,k){return k(null,f)};return E(S,function(T,k){if(T)return x(new Mt("error in secret or public key callback: "+T.message));let O=C[2].trim()!=="";if(!O&&k)return x(new Mt("jwt signature is required"));if(O&&!k)return x(new Mt("secret or public key must be provided"));if(!O&&!h.algorithms)return x(new Mt('please specify "none" in "algorithms" to verify unsigned tokens'));if(k!=null&&!(k instanceof Fde))try{k=$de(k)}catch(A){try{k=Ude(typeof k==="string"?Buffer.from(k):k)}catch(j){return x(new Mt("secretOrPublicKey is not valid key material"))}}if(!h.algorithms)if(k.type==="secret")h.algorithms=Hde;else if(["rsa","rsa-pss"].includes(k.asymmetricKeyType))h.algorithms=kv;else if(k.asymmetricKeyType==="ec")h.algorithms=Vde;else h.algorithms=Tv;if(h.algorithms.indexOf(w.header.alg)===-1)return x(new Mt("invalid algorithm"));if(S.alg.startsWith("HS")&&k.type!=="secret")return x(new Mt(`secretOrPublicKey must be a symmetric key when using ${S.alg}`));else if(/^(?:RS|PS|ES)/.test(S.alg)&&k.type!=="public")return x(new Mt(`secretOrPublicKey must be an asymmetric key when using ${S.alg}`));if(!h.allowInvalidAsymmetricKeyTypes)try{jde(S.alg,k)}catch(A){return x(A)}let R;try{R=qde.verify(o,w.header.alg,k)}catch(A){return x(A)}if(!R)return x(new Mt("invalid signature"));let I=w.payload;if(typeof I.nbf<"u"&&!h.ignoreNotBefore){if(typeof I.nbf!=="number")return x(new Mt("invalid nbf value"));if(I.nbf>z+(h.clockTolerance||0))return x(new Bde("jwt not active",new Date(I.nbf*1000)))}if(typeof I.exp<"u"&&!h.ignoreExpiration){if(typeof I.exp!=="number")return x(new Mt("invalid exp value"));if(z>=I.exp+(h.clockTolerance||0))return x(new jL("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(F){return A.some(function(q){return q instanceof RegExp?q.test(F):q===F})}))return x(new Mt("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 Mt("jwt issuer invalid. expected: "+h.issuer))}if(h.subject){if(I.sub!==h.subject)return x(new Mt("jwt subject invalid. expected: "+h.subject))}if(h.jwtid){if(I.jti!==h.jwtid)return x(new Mt("jwt jwtid invalid. expected: "+h.jwtid))}if(h.nonce){if(I.nonce!==h.nonce)return x(new Mt("jwt nonce invalid. expected: "+h.nonce))}if(h.maxAge){if(typeof I.iat!=="number")return x(new Mt("iat required when maxAge is specified"));let A=Nde(h.maxAge,I.iat);if(typeof A>"u")return x(new Mt('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(z>=A+(h.clockTolerance||0))return x(new jL("maxAge exceeded",new Date(A*1000)))}if(h.complete===!0){let A=w.signature;return x(null,{header:S,payload:I,signature:A})}return x(null,I)})}});var GL=i(function(UDe,HL){var FL=1/0,$L=9007199254740991,Gde=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,UL=NaN,Kde="[object Arguments]",Wde="[object Function]",Jde="[object GeneratorFunction]",Zde="[object String]",Yde="[object Symbol]",Xde=/^\s+|\s+$/g,Qde=/^[-+]0x[0-9a-f]+$/i,epe=/^0b[01]+$/i,tpe=/^0o[0-7]+$/i,rpe=/^(?:0|[1-9]\d*)$/,ope=parseInt;function npe(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 ipe(o,f,h,y){var x=o.length,z=h+(y?1:-1);while(y?z--:++z<x)if(f(o[z],z,o))return z;return-1}function spe(o,f,h){if(f!==f)return ipe(o,ape,h);var y=h-1,x=o.length;while(++y<x)if(o[y]===f)return y;return-1}function ape(o){return o!==o}function cpe(o,f){var h=-1,y=Array(o);while(++h<o)y[h]=f(h);return y}function lpe(o,f){return npe(f,function(h){return o[h]})}function upe(o,f){return function(h){return o(f(h))}}var Mf=Object.prototype,{hasOwnProperty:Iv,toString:qf,propertyIsEnumerable:dpe}=Mf,ppe=upe(Object.keys,Object),fpe=Math.max;function hpe(o,f){var h=VL(o)||vpe(o)?cpe(o.length,String):[],y=h.length,x=!!y;for(var z in o)if((f||Iv.call(o,z))&&!(x&&(z=="length"||gpe(z,y))))h.push(z);return h}function mpe(o){if(!ype(o))return ppe(o);var f=[];for(var h in Object(o))if(Iv.call(o,h)&&h!="constructor")f.push(h);return f}function gpe(o,f){return f=f==null?$L:f,!!f&&(typeof o=="number"||rpe.test(o))&&(o>-1&&o%1==0&&o<f)}function ype(o){var f=o&&o.constructor,h=typeof f=="function"&&f.prototype||Mf;return o===h}function bpe(o,f,h,y){o=Rv(o)?o:Ope(o),h=h&&!y?Epe(h):0;var x=o.length;if(h<0)h=fpe(x+h,0);return Cpe(o)?h<=x&&o.indexOf(f,h)>-1:!!x&&spe(o,f,h)>-1}function vpe(o){return xpe(o)&&Iv.call(o,"callee")&&(!dpe.call(o,"callee")||qf.call(o)==Kde)}var VL=Array.isArray;function Rv(o){return o!=null&&zpe(o.length)&&!_pe(o)}function xpe(o){return Av(o)&&Rv(o)}function _pe(o){var f=Ov(o)?qf.call(o):"";return f==Wde||f==Jde}function zpe(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=$L}function Ov(o){var f=typeof o;return!!o&&(f=="object"||f=="function")}function Av(o){return!!o&&typeof o=="object"}function Cpe(o){return typeof o=="string"||!VL(o)&&Av(o)&&qf.call(o)==Zde}function wpe(o){return typeof o=="symbol"||Av(o)&&qf.call(o)==Yde}function Spe(o){if(!o)return o===0?o:0;if(o=Tpe(o),o===FL||o===-FL){var f=o<0?-1:1;return f*Gde}return o===o?o:0}function Epe(o){var f=Spe(o),h=f%1;return f===f?h?f-h:f:0}function Tpe(o){if(typeof o=="number")return o;if(wpe(o))return UL;if(Ov(o)){var f=typeof o.valueOf=="function"?o.valueOf():o;o=Ov(f)?f+"":f}if(typeof o!="string")return o===0?o:+o;o=o.replace(Xde,"");var h=epe.test(o);return h||tpe.test(o)?ope(o.slice(2),h?2:8):Qde.test(o)?UL:+o}function kpe(o){return Rv(o)?hpe(o):mpe(o)}function Ope(o){return o?lpe(o,kpe(o)):[]}HL.exports=bpe});var WL=i(function($De,KL){var Ipe="[object Boolean]",Rpe=Object.prototype,Ape=Rpe.toString;function Ppe(o){return o===!0||o===!1||Dpe(o)&&Ape.call(o)==Ipe}function Dpe(o){return!!o&&typeof o=="object"}KL.exports=Ppe});var QL=i(function(VDe,XL){var JL=1/0,Bpe=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,ZL=NaN,Lpe="[object Symbol]",Npe=/^\s+|\s+$/g,jpe=/^[-+]0x[0-9a-f]+$/i,Mpe=/^0b[01]+$/i,qpe=/^0o[0-7]+$/i,Fpe=parseInt,Upe=Object.prototype,$pe=Upe.toString;function Vpe(o){return typeof o=="number"&&o==Wpe(o)}function YL(o){var f=typeof o;return!!o&&(f=="object"||f=="function")}function Hpe(o){return!!o&&typeof o=="object"}function Gpe(o){return typeof o=="symbol"||Hpe(o)&&$pe.call(o)==Lpe}function Kpe(o){if(!o)return o===0?o:0;if(o=Jpe(o),o===JL||o===-JL){var f=o<0?-1:1;return f*Bpe}return o===o?o:0}function Wpe(o){var f=Kpe(o),h=f%1;return f===f?h?f-h:f:0}function Jpe(o){if(typeof o=="number")return o;if(Gpe(o))return ZL;if(YL(o)){var f=typeof o.valueOf=="function"?o.valueOf():o;o=YL(f)?f+"":f}if(typeof o!="string")return o===0?o:+o;o=o.replace(Npe,"");var h=Mpe.test(o);return h||qpe.test(o)?Fpe(o.slice(2),h?2:8):jpe.test(o)?ZL:+o}XL.exports=Vpe});var tN=i(function(HDe,eN){var Zpe="[object Number]",Ype=Object.prototype,Xpe=Ype.toString;function Qpe(o){return!!o&&typeof o=="object"}function efe(o){return typeof o=="number"||Qpe(o)&&Xpe.call(o)==Zpe}eN.exports=efe});var iN=i(function(GDe,nN){var tfe="[object Object]";function rfe(o){var f=!1;if(o!=null&&typeof o.toString!="function")try{f=!!(o+"")}catch(h){}return f}function ofe(o,f){return function(h){return o(f(h))}}var nfe=Function.prototype,rN=Object.prototype,oN=nfe.toString,ife=rN.hasOwnProperty,sfe=oN.call(Object),afe=rN.toString,cfe=ofe(Object.getPrototypeOf,Object);function lfe(o){return!!o&&typeof o=="object"}function ufe(o){if(!lfe(o)||afe.call(o)!=tfe||rfe(o))return!1;var f=cfe(o);if(f===null)return!0;var h=ife.call(f,"constructor")&&f.constructor;return typeof h=="function"&&h instanceof h&&oN.call(h)==sfe}nN.exports=ufe});var aN=i(function(KDe,sN){var dfe="[object String]",pfe=Object.prototype,ffe=pfe.toString,hfe=Array.isArray;function mfe(o){return!!o&&typeof o=="object"}function gfe(o){return typeof o=="string"||!hfe(o)&&mfe(o)&&ffe.call(o)==dfe}sN.exports=gfe});var pN=i(function(WDe,dN){var yfe="Expected a function",cN=1/0,bfe=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,lN=NaN,vfe="[object Symbol]",xfe=/^\s+|\s+$/g,_fe=/^[-+]0x[0-9a-f]+$/i,zfe=/^0b[01]+$/i,Cfe=/^0o[0-7]+$/i,wfe=parseInt,Sfe=Object.prototype,Efe=Sfe.toString;function Tfe(o,f){var h;if(typeof f!="function")throw TypeError(yfe);return o=Afe(o),function(){if(--o>0)h=f.apply(this,arguments);if(o<=1)f=void 0;return h}}function kfe(o){return Tfe(2,o)}function uN(o){var f=typeof o;return!!o&&(f=="object"||f=="function")}function Ofe(o){return!!o&&typeof o=="object"}function Ife(o){return typeof o=="symbol"||Ofe(o)&&Efe.call(o)==vfe}function Rfe(o){if(!o)return o===0?o:0;if(o=Pfe(o),o===cN||o===-cN){var f=o<0?-1:1;return f*bfe}return o===o?o:0}function Afe(o){var f=Rfe(o),h=f%1;return f===f?h?f-h:f:0}function Pfe(o){if(typeof o=="number")return o;if(Ife(o))return lN;if(uN(o)){var f=typeof o.valueOf=="function"?o.valueOf():o;o=uN(f)?f+"":f}if(typeof o!="string")return o===0?o:+o;o=o.replace(xfe,"");var h=zfe.test(o);return h||Cfe.test(o)?wfe(o.slice(2),h?2:8):_fe.test(o)?lN:+o}dN.exports=kfe});var _N=i(function(JDe,xN){var fN=cv(),Dfe=Ev(),Bfe=Sv(),gN=xc(),Lfe=GL(),Ff=WL(),hN=QL(),Pv=tN(),yN=iN(),Ai=aN(),Nfe=pN(),{KeyObject:jfe,createSecretKey:Mfe,createPrivateKey:qfe}=c("crypto"),bN=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];if(Dfe)bN.splice(3,0,"PS256","PS384","PS512");var Ffe={expiresIn:{isValid:function(o){return hN(o)||Ai(o)&&o},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(o){return hN(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:Lfe.bind(null,bN),message:'"algorithm" must be a valid string enum value'},header:{isValid:yN,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:Ff,message:'"noTimestamp" must be a boolean'},keyid:{isValid:Ai,message:'"keyid" must be a string'},mutatePayload:{isValid:Ff,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:Ff,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:Ff,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},Ufe={iat:{isValid:Pv,message:'"iat" should be a number of seconds'},exp:{isValid:Pv,message:'"exp" should be a number of seconds'},nbf:{isValid:Pv,message:'"nbf" should be a number of seconds'}};function vN(o,f,h,y){if(!yN(h))throw Error('Expected "'+y+'" to be a plain object.');Object.keys(h).forEach(function(x){let z=o[x];if(!z){if(!f)throw Error('"'+x+'" is not allowed in "'+y+'"');return}if(!z.isValid(h[x]))throw Error(z.message)})}function $fe(o){return vN(Ffe,!1,o,"options")}function Vfe(o){return vN(Ufe,!0,o,"payload")}var mN={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},Hfe=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];xN.exports=function(o,f,h,y){if(typeof h==="function")y=h,h={};else h=h||{};let x=typeof o==="object"&&!Buffer.isBuffer(o),z=Object.assign({alg:h.algorithm||"HS256",typ:x?"JWT":void 0,kid:h.keyid},h.header);function C(E){if(y)return y(E);throw E}if(!f&&h.algorithm!=="none")return C(Error("secretOrPrivateKey must have a value"));if(f!=null&&!(f instanceof jfe))try{f=qfe(f)}catch(E){try{f=Mfe(typeof f==="string"?Buffer.from(f):f)}catch(T){return C(Error("secretOrPrivateKey is not valid key material"))}}if(z.alg.startsWith("HS")&&f.type!=="secret")return C(Error(`secretOrPrivateKey must be a symmetric key when using ${z.alg}`));else if(/^(?:RS|PS|ES)/.test(z.alg)){if(f.type!=="private")return C(Error(`secretOrPrivateKey must be an asymmetric key when using ${z.alg}`));if(!h.allowInsecureKeySizes&&!z.alg.startsWith("ES")&&f.asymmetricKeyDetails!==void 0&&f.asymmetricKeyDetails.modulusLength<2048)return C(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${z.alg}`))}if(typeof o>"u")return C(Error("payload is required"));else if(x){try{Vfe(o)}catch(E){return C(E)}if(!h.mutatePayload)o=Object.assign({},o)}else{let E=Hfe.filter(function(T){return typeof h[T]<"u"});if(E.length>0)return C(Error("invalid "+E.join(",")+" option for "+typeof o+" payload"))}if(typeof o.exp<"u"&&typeof h.expiresIn<"u")return C(Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(typeof o.nbf<"u"&&typeof h.notBefore<"u")return C(Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{$fe(h)}catch(E){return C(E)}if(!h.allowInvalidAsymmetricKeyTypes)try{Bfe(z.alg,f)}catch(E){return C(E)}let w=o.iat||Math.floor(Date.now()/1000);if(h.noTimestamp)delete o.iat;else if(x)o.iat=w;if(typeof h.notBefore<"u"){try{o.nbf=fN(h.notBefore,w)}catch(E){return C(E)}if(typeof o.nbf>"u")return C(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=fN(h.expiresIn,w)}catch(E){return C(E)}if(typeof o.exp>"u")return C(Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(mN).forEach(function(E){let T=mN[E];if(typeof h[E]<"u"){if(typeof o[T]<"u")return C(Error('Bad "options.'+E+'" option. The payload already has an "'+T+'" property.'));o[T]=h[E]}});let S=h.encoding||"utf8";if(typeof y==="function")y=y&&Nfe(y),gN.createSign({header:z,privateKey:f,payload:o,encoding:S}).once("error",y).once("done",function(E){if(!h.allowInsecureKeySizes&&/^(?:RS|PS)/.test(z.alg)&&E.length<256)return y(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${z.alg}`));y(null,E)});else{let E=gN.sign({header:z,payload:o,secret:f,encoding:S});if(!h.allowInsecureKeySizes&&/^(?:RS|PS)/.test(z.alg)&&E.length<256)throw Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${z.alg}`);return E}}});var CN=i(function(ZDe,zN){zN.exports={decode:iv(),verify:qL(),sign:_N(),JsonWebTokenError:fu(),NotBeforeError:sv(),TokenExpiredError:av()}});var Ds=i(function(fn){var Gfe=fn&&fn.__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]}),Kfe=fn&&fn.__setModuleDefault||(Object.create?function(o,f){Object.defineProperty(o,"default",{enumerable:!0,value:f})}:function(o,f){o.default=f}),Wfe=fn&&fn.__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")Gfe(h,f,y[x])}return Kfe(h,f),h}}();Object.defineProperty(fn,"__esModule",{value:!0});fn.Cache=void 0;fn.hashCacheKey=Yfe;var Jfe=Wfe(c("node:crypto")),Zfe=ba();class wN{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(Xfe(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}}fn.Cache=wN;async function Yfe(o){let f=Zfe.stringify(o),h=new TextEncoder().encode(f),y=await Jfe.subtle.digest("SHA-256",h);return Array.from(new Uint8Array(y)).map((C)=>C.toString(16).padStart(2,"0")).join("")}function Xfe(o){if(o.expires===void 0)return!1;return o.expires<Date.now()}});var xu=i(function(TN){Object.defineProperty(TN,"__esModule",{value:!0});TN.getIssuerSubdomain=Qfe;TN.replaceSubdomain=ehe;var SN=c("url"),Dv=se();function Qfe(o,f=!1){let h=f&&o?.ias_iss?o.ias_iss:o?.iss;if(h){if(!Dv.isValidUrl(h))throw Error(`Issuer URL in JWT is not a valid URL: "${h}".`);return EN(new SN.URL(h)).split(".")[0]}}function EN(o){let{host:f}=o;if(!f||f.indexOf(".")===-1)throw Error(`Failed to determine hostname: invalid host in "${o}".`);return f}function ehe(o,f){if(!Dv.isValidUrl(o))throw Error(`Base URL is not a valid URL: "${o}".`);let h=new SN.URL(o),y=EN(h).split("."),x=f?[f]:[];h.hostname=[...x,...y.slice(1)].join(".");let z=h.toString();return z=Dv.removeTrailingSlashes(z),z}});var _u=i(function(AN){Object.defineProperty(AN,"__esModule",{value:!0});AN.verificationKeyCache=AN.defaultTenantId=void 0;AN.userId=she;AN.getDefaultTenantId=ahe;AN.getTenantId=che;AN.isIasToken=IN;AN.getSubdomain=lhe;AN.audiences=uhe;AN.decodeJwt=Uf;AN.decodeJwtComplete=RN;AN.retrieveJwt=fhe;AN.wrapJwtInHeader=ghe;AN.isXsuaaToken=yhe;AN.getJwtPair=bhe;AN.isUserToken=vhe;var kN=se(),ohe=CN(),nhe=Ds(),ihe=xu(),Za=kN.createLogger({package:"connectivity",messageContext:"jwt"});AN.defaultTenantId="provider-tenant";function ON(o){return o?Array.isArray(o)?o:[o]:[]}function she(o){let f=o.user_id||o.user_uuid;return Za.debug(`JWT user identifier is: ${f} (from ${o.user_id?"user_id (XSUAA)":"user_uuid (IAS)"}).`),f}function ahe(){return Za.debug("Could not determine tenant from JWT nor XSUAA, identity or destination service binding. Client Credentials token is cached without tenant information."),AN.defaultTenantId}function che(o){let f=o?Uf(o):{};return Za.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 IN(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 lhe(o){let f=o?Uf(o):{};return f?.ext_attr?.zdn||(IN(f)?void 0:ihe.getIssuerSubdomain(f))}function uhe(o){let f=dhe(o);return f.length?f:phe(o)}function dhe({aud:o}){return ON(o).map((f)=>f.split(".")[0])}function phe({scope:o}){return ON(o).reduce((f,h)=>h.includes(".")?[...f,h.split(".")[0]]:f,[])}function Uf(o){return typeof o==="string"?RN(o).payload:o}function RN(o){let f=ohe.decode(o,{complete:!0,json:!0});if(f!==null&&xhe(f))return f;throw Error("JwtError: The given jwt payload does not encode valid JSON.")}function fhe(o){let f=hhe(o);if(mhe(f))return f?.split(" ")[1]}function hhe(o){let f=kN.pickValueIgnoreCase(o.headers,"authorization");if(f)return Array.isArray(f)?f[0]:f}function mhe(o){if(typeof o>"u")return Za.warn("Authorization header not set."),!1;let[f,h]=o.split(" ");if(typeof h>"u")return Za.warn("Token in auth header missing."),!1;if(f.toLowerCase()!=="bearer")return Za.warn("Authorization type is not Bearer."),!1;return!0}AN.verificationKeyCache=new nhe.Cache(900000);function ghe(o){return{headers:{Authorization:"Bearer "+o}}}function yhe(o){return o?.ext_attr?.enhancer==="XSUAA"}function bhe(o){return{encoded:o,decoded:Uf(o)}}function vhe(o){if(!o)return!1;let f=Object.keys(o.decoded);return!(f.length===1&&f[0]==="iss")}function xhe(o){return typeof o.payload!=="string"}});var Bv=i(function(Nhe,BN){var Dhe=c("assert");Nhe.apply=Bhe;function Bhe(o,f){if(Dhe(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(Lhe(o[y],f))h.push(o[y]);return h}function Lhe(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 jN=i(function(eBe,NN){var $f=c("assert"),Mhe=c("stream").Stream,qhe=c("util"),Fhe=/^[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 Lv(o){return o.charAt(0).toUpperCase()+o.slice(1)}function Pi(o,f,h,y,x){throw new $f.AssertionError({message:qhe.format("%s (%s) is required",o,f),actual:x===void 0?typeof y:x(y),expected:f,operator:h||"===",stackStartFunction:Pi.caller})}function Nv(o){return Object.prototype.toString.call(o).slice(8,-1)}function Ya(){}var zu={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 Mhe},operator:"instanceof",actual:Nv},date:{check:function(o){return o instanceof Date},operator:"instanceof",actual:Nv},regexp:{check:function(o){return o instanceof RegExp},operator:"instanceof",actual:Nv},uuid:{check:function(o){return typeof o==="string"&&Fhe.test(o)},operator:"isUUID"}};function LN(o){var f=Object.keys(zu),h;if(process.env.NODE_NDEBUG)h=Ya;else h=function(y,x){if(!y)Pi(x,"true",y)};return f.forEach(function(y){if(o){h[y]=Ya;return}var x=zu[y];h[y]=function(z,C){if(!x.check(z))Pi(C,y,x.operator,z,x.actual)}}),f.forEach(function(y){var x="optional"+Lv(y);if(o){h[x]=Ya;return}var z=zu[y];h[x]=function(C,w){if(C===void 0||C===null)return;if(!z.check(C))Pi(w,y,z.operator,C,z.actual)}}),f.forEach(function(y){var x="arrayOf"+Lv(y);if(o){h[x]=Ya;return}var z=zu[y],C="["+y+"]";h[x]=function(w,S){if(!Array.isArray(w))Pi(S,C,z.operator,w,z.actual);var E;for(E=0;E<w.length;E++)if(!z.check(w[E]))Pi(S,C,z.operator,w,z.actual)}}),f.forEach(function(y){var x="optionalArrayOf"+Lv(y);if(o){h[x]=Ya;return}var z=zu[y],C="["+y+"]";h[x]=function(w,S){if(w===void 0||w===null)return;if(!Array.isArray(w))Pi(S,C,z.operator,w,z.actual);var E;for(E=0;E<w.length;E++)if(!z.check(w[E]))Pi(S,C,z.operator,w,z.actual)}}),Object.keys($f).forEach(function(y){if(y==="AssertionError"){h[y]=$f[y];return}if(o){h[y]=Ya;return}h[y]=$f[y]}),h._setExports=LN,h}NN.exports=LN(process.env.NODE_NDEBUG)});var FN=i(function(Vhe){var wu=c("assert"),Uhe=c("util");Vhe.sprintf=Mv;Vhe.printf=$he;Vhe.fprintf=MN;function Mv(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,T,k,O,R,I="",A=1,j=0,P,F;wu.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),F=R[0].substring(R[1].length),P=j+R[1].length+1,j+=R[0].length,z=R[2]||"",C=R[3]||0,w=R[4]||"",S=R[6],E=!1,k=!1,T=" ",S=="%"){I+="%";continue}if(y.length===0)throw Cu(o,P,F,"has no matching argument (too few arguments passed)");if(O=y.shift(),A++,z.match(/[\' #]/))throw Cu(o,P,F,"uses unsupported flags");if(w.length>0)throw Cu(o,P,F,"uses non-zero precision (not supported)");if(z.match(/-/))E=!0;if(z.match(/0/))T="0";if(z.match(/\+/))k=!0;switch(S){case"s":if(O===void 0||O===null)throw Cu(o,P,F,"attempted to print undefined or null as a string (argument "+A+" to sprintf)");I+=jv(T,C,E,O.toString());break;case"d":O=Math.floor(O);case"f":k=k&&O>0?"+":"",I+=k+jv(T,C,E,O.toString());break;case"x":I+=jv(T,C,E,O.toString(16));break;case"j":if(C===0)C=10;I+=Uhe.inspect(O,!1,C);break;case"r":I+=qN(O);break;default:throw Cu(o,P,F,"is not supported")}}return I+=x,I}function Cu(o,f,h,y){return wu.equal(typeof o,"string"),wu.equal(typeof h,"string"),wu.equal(typeof f,"number"),wu.equal(typeof y,"string"),Error('format string "'+o+'": conversion specifier "'+h+'" at character '+f+" "+y)}function $he(){var o=Array.prototype.slice.call(arguments);o.unshift(process.stdout),MN.apply(null,o)}function MN(o){var f=Array.prototype.slice.call(arguments,1);return o.write(Mv.apply(this,f))}function jv(o,f,h,y){var x=y;while(x.length<f)if(h)x+=o;else x=o+x;return x}function qN(o){var f;if(!(o instanceof Error))throw Error(Mv("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: `+qN(h)}return f}});var UN=i(function(cme){function Whe(o){if(Array.isArray)return Array.isArray(o);return Vf(o)==="[object Array]"}cme.isArray=Whe;function Jhe(o){return typeof o==="boolean"}cme.isBoolean=Jhe;function Zhe(o){return o===null}cme.isNull=Zhe;function Yhe(o){return o==null}cme.isNullOrUndefined=Yhe;function Xhe(o){return typeof o==="number"}cme.isNumber=Xhe;function Qhe(o){return typeof o==="string"}cme.isString=Qhe;function eme(o){return typeof o==="symbol"}cme.isSymbol=eme;function tme(o){return o===void 0}cme.isUndefined=tme;function rme(o){return Vf(o)==="[object RegExp]"}cme.isRegExp=rme;function ome(o){return typeof o==="object"&&o!==null}cme.isObject=ome;function nme(o){return Vf(o)==="[object Date]"}cme.isDate=nme;function ime(o){return Vf(o)==="[object Error]"||o instanceof Error}cme.isError=ime;function sme(o){return typeof o==="function"}cme.isFunction=sme;function ame(o){return o===null||typeof o==="boolean"||typeof o==="number"||typeof o==="string"||typeof o==="symbol"||typeof o>"u"}cme.isPrimitive=ame;cme.isBuffer=Buffer.isBuffer;function Vf(o){return Object.prototype.toString.call(o)}});var Eu=i(function(oBe,$N){var dr=jN(),Hf=c("util"),wme=FN(),hn=UN().isError,Sme=wme.sprintf;$N.exports=xt;xt.VError=xt;xt.SError=Su;xt.WError=Di;xt.MultiError=Xa;function qv(o){var f,h,y,x,z;if(dr.object(o,"args"),dr.bool(o.strict,"args.strict"),dr.array(o.argv,"args.argv"),f=o.argv,f.length===0)h={},y=[];else if(hn(f[0]))h={cause:f[0]},y=f.slice(1);else if(typeof f[0]==="object"){h={};for(z in f[0])h[z]=f[0][z];y=f.slice(1)}else dr.string(f[0],"first argument to VError, SError, or WError constructor must be a string, object, or Error"),h={},y=f;if(dr.object(h),!h.strict&&!o.strict)y=y.map(function(C){return C===null?"null":C===void 0?"undefined":C});if(y.length===0)x="";else x=Sme.apply(null,y);return{options:h,shortmessage:x}}function xt(){var o,f,h,y,x,z,C;if(o=Array.prototype.slice.call(arguments,0),!(this instanceof xt))return f=Object.create(xt.prototype),xt.apply(f,arguments),f;if(h=qv({argv:o,strict:!1}),h.options.name)dr.string(h.options.name,`error's "name" must be a string`),this.name=h.options.name;if(this.jse_shortmsg=h.shortmessage,z=h.shortmessage,y=h.options.cause,y){if(dr.ok(hn(y),"cause is not an Error"),this.jse_cause=y,!h.options.skipCauseMessage)z+=": "+y.message}if(this.jse_info={},h.options.info)for(C in h.options.info)this.jse_info[C]=h.options.info[C];if(this.message=z,Error.call(this,z),Error.captureStackTrace)x=h.options.constructorOpt||this.constructor,Error.captureStackTrace(this,x);return this}Hf.inherits(xt,Error);xt.prototype.name="VError";xt.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};xt.prototype.cause=function(){var f=xt.cause(this);return f===null?void 0:f};xt.cause=function(o){return dr.ok(hn(o),"err must be an Error"),hn(o.jse_cause)?o.jse_cause:null};xt.info=function(o){var f,h,y;if(dr.ok(hn(o),"err must be an Error"),h=xt.cause(o),h!==null)f=xt.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};xt.findCauseByName=function(o,f){var h;dr.ok(hn(o),"err must be an Error"),dr.string(f,"name"),dr.ok(f.length>0,"name cannot be empty");for(h=o;h!==null;h=xt.cause(h))if(dr.ok(hn(h)),h.name==f)return h;return null};xt.hasCauseWithName=function(o,f){return xt.findCauseByName(o,f)!==null};xt.fullStack=function(o){dr.ok(hn(o),"err must be an Error");var f=xt.cause(o);if(f)return o.stack+`
103
+ caused by: `+xt.fullStack(f);return o.stack};xt.errorFromList=function(o){if(dr.arrayOfObject(o,"errors"),o.length===0)return null;if(o.forEach(function(f){dr.ok(hn(f))}),o.length==1)return o[0];return new Xa(o)};xt.errorForEach=function(o,f){if(dr.ok(hn(o),"err must be an Error"),dr.func(f,"func"),o instanceof Xa)o.errors().forEach(function(y){f(y)});else f(o)};function Su(){var o,f,h,y;if(o=Array.prototype.slice.call(arguments,0),!(this instanceof Su))return f=Object.create(Su.prototype),Su.apply(f,arguments),f;return h=qv({argv:o,strict:!0}),y=h.options,xt.call(this,y,"%s",h.shortmessage),this}Hf.inherits(Su,xt);function Xa(o){dr.array(o,"list of errors"),dr.ok(o.length>0,"must be at least one error"),this.ase_errors=o,xt.call(this,{cause:o[0]},"first of %d error%s",o.length,o.length==1?"":"s")}Hf.inherits(Xa,xt);Xa.prototype.name="MultiError";Xa.prototype.errors=function(){return this.ase_errors.slice(0)};function Di(){var o,f,h,y;if(o=Array.prototype.slice.call(arguments,0),!(this instanceof Di))return f=Object.create(Di.prototype),Di.apply(f,o),f;return h=qv({argv:o,strict:!1}),y=h.options,y.skipCauseMessage=!0,xt.call(this,y,"%s",h.shortmessage),this}Hf.inherits(Di,xt);Di.prototype.name="WError";Di.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};Di.prototype.cause=function(f){if(hn(f))this.jse_cause=f;return this.jse_cause}});var Uv=i(function(Ome){var Eme=Bv(),VN=Eu(),Tme=c("fs"),Fv=Ct()("cf-services");Ome.readCFServices=HN;Ome.filterCFServices=kme;function HN(){let o,f=process.env.VCAP_SERVICES_FILE_PATH;if(f)try{let y=Tme.readFileSync(f,"utf8");o=JSON.parse(y),Fv(`Successfully read services from file: ${f}`)}catch(y){throw new VN(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),Fv("Successfully read services from VCAP_SERVICES environment variable")}catch(y){throw new VN(y,"Environment variable VCAP_SERVICES is not a valid JSON string.")}else{Fv("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 z=o[y][x];h[z.name]=z}return h}function kme(o){return Eme.apply(HN(),o)}});var GN=i(function(iBe,Gf){var Ame=function(){function o(T,k){return k!=null&&T instanceof k}var f;try{f=Map}catch(T){f=function(){}}var h;try{h=Set}catch(T){h=function(){}}var y;try{y=Promise}catch(T){y=function(){}}function x(T,k,O,R,I){if(typeof k==="object")O=k.depth,R=k.prototype,I=k.includeNonEnumerable,k=k.circular;var A=[],j=[],P=typeof Buffer<"u";if(typeof k>"u")k=!0;if(typeof O>"u")O=1/0;function F(q,W){if(q===null)return null;if(W===0)return q;var ee,te;if(typeof q!="object")return q;if(o(q,f))ee=new f;else if(o(q,h))ee=new h;else if(o(q,y))ee=new y(function(Pe,re){q.then(function(oe){Pe(F(oe,W-1))},function(oe){re(F(oe,W-1))})});else if(x.__isArray(q))ee=[];else if(x.__isRegExp(q)){if(ee=new RegExp(q.source,E(q)),q.lastIndex)ee.lastIndex=q.lastIndex}else if(x.__isDate(q))ee=new Date(q.getTime());else if(P&&Buffer.isBuffer(q)){if(Buffer.allocUnsafe)ee=Buffer.allocUnsafe(q.length);else ee=new Buffer(q.length);return q.copy(ee),ee}else if(o(q,Error))ee=Object.create(q);else if(typeof R>"u")te=Object.getPrototypeOf(q),ee=Object.create(te);else ee=Object.create(R),te=R;if(k){var le=A.indexOf(q);if(le!=-1)return j[le];A.push(q),j.push(ee)}if(o(q,f))q.forEach(function(Pe,re){var oe=F(re,W-1),Ke=F(Pe,W-1);ee.set(oe,Ke)});if(o(q,h))q.forEach(function(Pe){var re=F(Pe,W-1);ee.add(re)});for(var he in q){var ye;if(te)ye=Object.getOwnPropertyDescriptor(te,he);if(ye&&ye.set==null)continue;ee[he]=F(q[he],W-1)}if(Object.getOwnPropertySymbols){var ke=Object.getOwnPropertySymbols(q);for(var he=0;he<ke.length;he++){var me=ke[he],Ae=Object.getOwnPropertyDescriptor(q,me);if(Ae&&!Ae.enumerable&&!I)continue;if(ee[me]=F(q[me],W-1),!Ae.enumerable)Object.defineProperty(ee,me,{enumerable:!1})}}if(I){var He=Object.getOwnPropertyNames(q);for(var he=0;he<He.length;he++){var Le=He[he],Ae=Object.getOwnPropertyDescriptor(q,Le);if(Ae&&Ae.enumerable)continue;ee[Le]=F(q[Le],W-1),Object.defineProperty(ee,Le,{enumerable:!1})}}return ee}return F(T,O)}x.clonePrototype=function(k){if(k===null)return null;var O=function(){};return O.prototype=k,new O};function z(T){return Object.prototype.toString.call(T)}x.__objToStr=z;function C(T){return typeof T==="object"&&z(T)==="[object Date]"}x.__isDate=C;function w(T){return typeof T==="object"&&z(T)==="[object Array]"}x.__isArray=w;function S(T){return typeof T==="object"&&z(T)==="[object RegExp]"}x.__isRegExp=S;function E(T){var k="";if(T.global)k+="g";if(T.ignoreCase)k+="i";if(T.multiline)k+="m";return k}return x.__getRegExpFlags=E,x}();if(typeof Gf==="object"&&Gf.exports)Gf.exports=Ame});var JN=i(function(KN,WN){(function(){var o,f,h,y=[].splice,x=function(C,w){if(!(C instanceof w))throw Error("Bound instance method accessed before binding")},z=[].indexOf;h=GN(),o=c("events").EventEmitter,WN.exports=f=function(){class C extends o{constructor(w={}){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=w,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((S)=>{var E=this[S];this[S]=function(...T){var k,O,R,I;if(R=T,[...T]=R,[k]=y.call(T,-1),typeof k==="function")try{I=E(...T),k(null,I)}catch(A){O=A,k(O)}else return E(...T,k)}});this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.validKeyTypes=["string","number"],this._checkData();return}get(w){var S,E;if(x(this,C),(E=this._isInvalidKey(w))!=null)throw E;if(this.data[w]!=null&&this._check(w,this.data[w]))return this.stats.hits++,S=this._unwrap(this.data[w]),S;else{this.stats.misses++;return}}mget(w){var S,E,T,k,O,R;if(x(this,C),!Array.isArray(w))throw S=this._error("EKEYSTYPE"),S;R={};for(T=0,O=w.length;T<O;T++){if(k=w[T],(E=this._isInvalidKey(k))!=null)throw E;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(w,S,E){var T,k,O;if(x(this,C),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw T=this._error("ECACHEFULL"),T;if(this.options.forceString&&!1==="string")S=JSON.stringify(S);if(E==null)E=this.options.stdTTL;if((k=this._isInvalidKey(w))!=null)throw k;if(O=!1,this.data[w])O=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[w],!1));if(this.data[w]=this._wrap(S,E),this.stats.vsize+=this._getValLength(S),!O)this.stats.ksize+=this._getKeyLength(w),this.stats.keys++;return this.emit("set",w,S),!0}mset(w){var S,E,T,k,O,R,I,A,j,P;if(x(this,C),this.options.maxKeys>-1&&this.stats.keys+w.length>=this.options.maxKeys)throw S=this._error("ECACHEFULL"),S;for(T=0,I=w.length;T<I;T++){if(R=w[T],{key:O,val:P,ttl:j}=R,j&&typeof j!=="number")throw S=this._error("ETTLTYPE"),S;if((E=this._isInvalidKey(O))!=null)throw E}for(k=0,A=w.length;k<A;k++)R=w[k],{key:O,val:P,ttl:j}=R,this.set(O,P,j);return!0}del(w){var S,E,T,k,O,R;if(x(this,C),!Array.isArray(w))w=[w];S=0;for(T=0,O=w.length;T<O;T++){if(k=w[T],(E=this._isInvalidKey(k))!=null)throw E;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--,S++,R=this.data[k],delete this.data[k],this.emit("del",k,R.v)}return S}take(w){var S;if(x(this,C),S=this.get(w),S!=null)this.del(w);return S}ttl(w,S){var E;if(x(this,C),S||(S=this.options.stdTTL),!w)return!1;if((E=this._isInvalidKey(w))!=null)throw E;if(this.data[w]!=null&&this._check(w,this.data[w])){if(S>=0)this.data[w]=this._wrap(this.data[w].v,S,!1);else this.del(w);return!0}else return!1}getTtl(w){var S,E;if(x(this,C),!w)return;if((E=this._isInvalidKey(w))!=null)throw E;if(this.data[w]!=null&&this._check(w,this.data[w]))return S=this.data[w].t,S;else return}keys(){var w;return x(this,C),w=Object.keys(this.data),w}has(w){var S;return x(this,C),S=this.data[w]!=null&&this._check(w,this.data[w]),S}getStats(){return x(this,C),this.stats}flushAll(w=!0){x(this,C),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this._killCheckPeriod(),this._checkData(w),this.emit("flush")}flushStats(){x(this,C),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){x(this,C),this._killCheckPeriod()}_checkData(w=!0){var S,E,T;x(this,C),E=this.data;for(S in E)T=E[S],this._check(S,T);if(w&&this.options.checkperiod>0){if(this.checkTimeout=setTimeout(this._checkData,this.options.checkperiod*1000,w),this.checkTimeout!=null&&this.checkTimeout.unref!=null)this.checkTimeout.unref()}}_killCheckPeriod(){if(this.checkTimeout!=null)return clearTimeout(this.checkTimeout)}_check(w,S){var E;if(x(this,C),E=!0,S.t!==0&&S.t<Date.now()){if(this.options.deleteOnExpire)E=!1,this.del(w);this.emit("expired",w,this._unwrap(S))}return E}_isInvalidKey(w){var S;if(x(this,C),S=typeof w,z.call(this.validKeyTypes,S)<0)return this._error("EKEYTYPE",{type:typeof w})}_wrap(w,S,E=!0){var T,k,O,R;if(x(this,C),!this.options.useClones)E=!1;if(k=Date.now(),T=0,R=1000,S===0)T=0;else if(S)T=k+S*R;else if(this.options.stdTTL===0)T=this.options.stdTTL;else T=k+this.options.stdTTL*R;return O={t:T,v:E?h(w):w}}_unwrap(w,S=!0){if(!this.options.useClones)S=!1;if(w.v!=null)if(S)return h(w.v);else return w.v;return null}_getKeyLength(w){return w.toString().length}_getValLength(w){if(x(this,C),typeof w==="string")return w.length;else if(this.options.forceString)return JSON.stringify(w).length;else if(Array.isArray(w))return this.options.arrayValueSize*w.length;else if(typeof w==="number")return 8;else if(typeof(w!=null?w.then:void 0)==="function")return this.options.promiseValueSize;else if(typeof Buffer<"u"&&Buffer!==null?Buffer.isBuffer(w):void 0)return w.length;else if(w!=null&&typeof w==="object")return this.options.objectValueSize*Object.keys(w).length;else if(typeof w==="boolean")return 8;else return 0}_error(w,S={}){var E;return x(this,C),E=Error(),E.name=w,E.errorcode=w,E.message=this.ERRORS[w]!=null?this.ERRORS[w](S):"-",E.data=S,E}_initErrors(){var w,S,E;x(this,C),this.ERRORS={},E=this._ERRORS;for(S in E)w=E[S],this.ERRORS[S]=this.createErrorMessage(w)}createErrorMessage(w){return function(S){return w.replace("__key",S.type)}}}return C.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."},C}.call(this)}).call(KN)});var XN=i(function(ZN,YN){(function(){var o=YN.exports=JN();o.version="5.1.2"}).call(ZN)});var Vv=i(function(Dme,ej){var $v=Ct()("xsenv"),QN=["certificate","key","verificationkey","clientsecret","password","usersecret"];Dme.redactServicesSecretData=Pme;function Pme(o){if(!o)return{};$v("Redacting Services Secret Data");let f=JSON.parse(JSON.stringify(o));if(!Object.keys(f)||Object.keys(f).length===0)return $v("Did not find any services keys in service data."),f;for(let h in f){if(!f[h].credentials)continue;for(let y in QN){let x=QN[y];if(f[h].credentials[x])f[h].credentials[x]="redacted"}}return $v(f),f}});var nj=i(function(Gme){var Bs=c("fs"),oj=c("assert"),Gv=c("path"),Tu=Ct()("xsenv"),Lme=XN(),tj=new Lme({stdTTL:540}),rj=Vv().redactServicesSecretData;Gme.readK8SServices=Hme;var Nme=(o)=>Bs.statSync(o).isFile(),Hv=(o)=>Bs.statSync(o).isDirectory();function jme(o){return/^{(.|\r?\n?)*}(\s)*$/.test(o)}function Mme(o){let f=Bs.readFileSync(o).toString("utf-8");if(process.env.XSENV_PARSE_ALL_JSON!=="true"){if(!jme(f))return f}try{f=JSON.parse(f)}catch(y){Tu("Content of file %s is not valid JSON object",o)}return f}function qme(o){let f={};for(let h of Bs.readdirSync(o)){let y=Gv.join(o,h);if(Nme(y))f[h]=Mme(y)}return f}function Fme(o,f){if(!o)return[f];if(process.env.XSENV_PARSE_ALL_JSON)return[...o];return JSON.parse(o)}function Ume(o,f,h){let y=qme(h),x=Fme(y.tags,o);if(!x.includes(o))x.push(o);return{credentials:y,name:f,label:y.label||o,tags:x}}function $me(o,f){let h={};for(let y of Bs.readdirSync(f)){let x=Gv.join(f,y);if(Hv(x))h[y]=Ume(o,y,x)}return h}function Vme(o){oj(Hv(o),"secrets path must be a directory");let f={};for(let h of Bs.readdirSync(o)){let y=Gv.join(o,h);if(Hv(y))Object.assign(f,$me(h,y))}return f}function Hme(o,f){o=o||process.env.SERVICE_BINDING_ROOT||"/etc/secrets/sapcp/",oj(typeof o==="string","secrets directory path must be string");let h=void 0,y=tj.get(`${o}-services`);if(y&&!f){Tu(`Cached Secrets found: ${o}-services`);let x=rj(y);return Tu(x),y}if(Bs.existsSync(o)){h=Vme(o),Tu(`Caching Secret: ${o}-services`);let x=rj(h);Tu(x),tj.set(`${o}-services`,h)}return h}});var cj=i(function(oge){var Ls=c("fs"),Wme=c("assert"),sj=c("path"),Kv=Ct()("xsenv");oge.readServiceBindingServices=rge;var Jme=(o)=>Ls.statSync(o).isDirectory();function Zme(o){let f={};for(let h of Ls.readdirSync(o,{withFileTypes:!0})){let y=sj.join(o,h.name);if(Yme(y,h))f[h.name]=Ls.readFileSync(y,"utf8")}return f}function Yme(o,f){if(f.isFile())return!0;if(f.isSymbolicLink()){let h=Ls.realpathSync(o);if(Ls.statSync(h).isFile())return!0}return!1}var Xme={type:!0,provider:!0};function aj(o){try{return JSON.parse(o)}catch(f){return}}function Qme(o){let f={credentials:{}};for(let h in o)if(h in Xme)f[h]=o[h];else f.credentials[h]=o[h];return f}function ij(o,f=[]){let h={};for(let y of f){let{name:x}=y,z=o[x];if(x&&typeof z<"u")switch(y.format){case"text":{h[x]=z;break}case"json":{let C=aj(z);if(y.container)Object.assign(h,C);else h[x]=C;break}default:Kv("Unexpected format %s",y.format)}else Kv("Missing property %s",x)}return h}function ege(o,f){let h=Zme(o),y=h[".metadata"],x;if(y){if(x=aj(y),typeof x>"u")Kv("Cannot parse JSON: %s/.metadata",o)}let z;if(x)z=ij(h,x.metaDataProperties),z.credentials=ij(h,x.credentialProperties);else z=Qme(h);if(!z.type)return;return z.name=f,z}function tge(o){Wme(Jme(o),"secrets path must be a directory");let f={};for(let h of Ls.readdirSync(o,{withFileTypes:!0}))if(h.isDirectory()){let y=sj.join(o,h.name),x=ege(y,h.name);if(x)f[x.name]=x}return f}function rge(o){if(o=o||process.env.SERVICE_BINDING_ROOT,typeof o==="string"&&o.length>0)return Ls.existsSync(o)?tge(o):void 0;else return}});var hj=i(function(fge){var ige=c("assert"),Wf=Eu(),Qa=Ct()("xsenv"),lj=c("fs"),Wv=Bv(),dj=Uv().readCFServices,pj=nj().readK8SServices,fj=cj().readServiceBindingServices,Kf=Vv().redactServicesSecretData;fge.getServices=sge;fge.filterServices=Jf;fge.serviceCredentials=dge;fge.readServices=pge;function sge(o,f,h){let y=typeof o==="string"?o:void 0,x=typeof o==="string"?f:o,z=typeof o==="string"?h:f;ige(x&&typeof x==="object","Missing mandatory query parameter");var C=age(z),w={};for(var S in x){var E=Jf(y,x[S]);if(E.length===1)w[S]=E[0].credentials;else if(E.length>1)throw new Wf("Found %d services matching %s",E.length,S);else{if(!C[S])throw new Wf("No service matches %s",S);Qa("No service in VCAP_SERVICES matches %s. Returning default configuration from %s",S,z),w[S]=C[S]}}return w}function age(o){var f={};if(o!==null){if(o=o||"default-services.json",lj.existsSync(o)){Qa("Loading default service configuration from %s",o);try{f=JSON.parse(lj.readFileSync(o,"utf8"))}catch(h){throw new Wf(h,"Could not parse %s",o)}}}return f}function Jf(o,f){let h=arguments.length===1?void 0:o,y=arguments.length===1?o:f,x=cge(h,y);if(!uj(x))x=lge(h,y);if(!uj(x))x=uge(h,y);return x}function cge(o,f){let h=Wv.apply(dj(),f);return Jv("CF",f,o,h),h}function lge(o,f){let h=Wv.apply(fj(o),f);return Jv("Service Binding",f,o||"default",h),h}function uge(o,f){let h=Wv.apply(pj(o),f);return Jv("K8s",f,o||"default",h),h}function uj(o){return o&&Array.isArray(o)&&o.length>0}function Jv(o,f,h,y){let x=Kf(y);Qa("%s Service filter with filter: %s and path: %s, returned: %s.",o,f,h,x)}function dge(o,f){let h=arguments.length===1?void 0:o,y=arguments.length===1?o:f;var x=h?Jf(h,y):Jf(y);if(x.length!==1)throw new Wf("Found %d matching services",x.length);return x[0].credentials}function pge(o,f){let h=dj();if(h&&Object.keys(h).length>0){let C=Kf(h);return Qa("Found services in VCAP_SERVICES_FILE_PATH or VCAP_SERVICES, returning: %s",C),h}let y=fj(o);if(y&&Object.keys(y).length>0){let C=Kf(y);return Qa("Found Service Bindings, returning: %s",C),y}let x=pj(o,f&&f.disableCache),z=Kf(x);return Qa("Empty VCAP_SERVICES, returning K8s services: %s.",JSON.stringify(z)),x||{}}});var mj=i(function(wge){var bge=Ct()("xsenv"),vge=c("path"),xge=c("fs"),_ge=c("assert"),zge=Eu();wge.loadCertificates=Cge;function Cge(o){if(_ge(!o||typeof o==="string","certPath argument should be a string"),o=o||process.env.XS_CACERT_PATH,o){bge("Loading certificate(s) %s",o);try{return o.split(vge.delimiter).map(function(f){return xge.readFileSync(f)})}catch(f){throw new zge(f,"Could not load certificate(s) "+o)}}}});var bj=i(function(uBe,yj){var gj=c("fs"),Ege=Ct()("xsenv"),Tge=Eu();yj.exports=kge;function kge(o){if(o=o||"default-env.json",!gj.existsSync(o))return;Ege("Loading environment from %s",o);try{var f=JSON.parse(gj.readFileSync(o,"utf8"))}catch(x){throw new Tge(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 xj=i(function(Ige){var vj=Uv(),ku=hj(),Oge=mj();Ige.loadCertificates=Oge.loadCertificates;Ige.loadEnv=bj();Ige.getServices=ku.getServices;Ige.filterServices=ku.filterServices;Ige.serviceCredentials=ku.serviceCredentials;Ige.readServices=ku.readServices;Ige.readCFServices=vj.readCFServices;Ige.cfServiceCredentials=ku.serviceCredentials;Ige.filterCFServices=vj.filterCFServices});var Yv=i(function(Fo){var qge=Fo&&Fo.__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]}),Fge=Fo&&Fo.__setModuleDefault||(Object.create?function(o,f){Object.defineProperty(o,"default",{enumerable:!0,value:f})}:function(o,f){o.default=f}),Uge=Fo&&Fo.__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")qge(h,f,y[x])}return Fge(h,f),h}}();Object.defineProperty(Fo,"__esModule",{value:!0});Fo.getServiceBindings=Vge;Fo.getServiceBinding=zj;Fo.resolveServiceBinding=Hge;Fo.getServiceBindingByInstanceName=Gge;var $ge=se(),Zv=Uge(xj()),_j=$ge.createLogger({package:"connectivity",messageContext:"environment-accessor"});function Vge(o){return Zv.filterServices({label:o})}function zj(o){let f=Zv.filterServices({label:o});if(!f.length)_j.warn(`Could not find service binding of type '${o}'. This might cause errors in other parts of the application.`);else if(f.length>1)_j.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 Hge(o){if(typeof o==="string"){let f=zj(o);if(!f)throw Error(`Could not find service binding of type '${o}'.`);return f}return o}function Gge(o){let f=Zv.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 Xv=i(function(Tj){Object.defineProperty(Tj,"__esModule",{value:!0});Tj.getServiceCredentials=Jge;var Kge=se(),Sj=_u(),Wge=Yv(),tc=Kge.createLogger({package:"connectivity",messageContext:"environment-accessor"});function Jge(o,f){let h=Zge(o);if(!h.length){tc.debug(`Could not find binding to service '${o}', that includes credentials.`);return}if(f)return Yge(o,h,typeof f==="string"?Sj.decodeJwt(f):f);return tc.debug(`No JWT given to select binding to service '${o}'.`),Xge(o,h)}function Zge(o){let f=Wge.getServiceBindings(o),h=f.map(({credentials:y})=>y).filter((y)=>y);if(h.length<f.length){let y=f.length-h.length;tc.warn(`Ignoring ${y} service binding${y>1?"s":""} of service type '${o}' because of missing credentials.`)}return h}function Yge(o,f,h){let y=f.filter((x)=>Qge(x,h)||e0e(x,h));return Ej(o,y,!0),y[0]}function Xge(o,f){return Ej(o,f,!1),f[0]}function Ej(o,f,h){if(f.length===1)tc.debug(`Found one service binding for service '${o}'${Cj(h)}. ${wj(f)}`);else if(f.length>1)tc.warn(`Found multiple bindings for service '${o}'${Cj(h)}. ${wj(f)}
106
+ Choosing first one ('${f[0].xsappname}').`);else if(h)tc.warn(`Found no service binding for service '${o}' matching either the token's client id or audience.`)}function Cj(o){return o?" using JWT":""}function wj(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 Qge(o,f){return o.clientid===f.client_id}function e0e(o,f){return Sj.audiences(f).includes(o.xsappname)}});var Oj=i(function(kj){Object.defineProperty(kj,"__esModule",{value:!0});kj.getDestinationServiceCredentials=o0e;var r0e=Xv();function o0e(){let o=r0e.getServiceCredentials("destination");if(!o)throw Error("Could not find binding to the destination service.");return o}});var Rj=i(function(Ij){Object.defineProperty(Ij,"__esModule",{value:!0})});var Pj=i(function(Aj){Object.defineProperty(Aj,"__esModule",{value:!0});Aj.clearXsuaaServices=s0e;Aj.getXsuaaInstanceFromServiceCredentials=a0e;var i0e=_f(),Ou={};function s0e(){Object.keys(Ou).forEach((o)=>delete Ou[o])}function a0e(o,f=!1){let h=f?{validation:{jwks:{expirationTime:0,refreshPeriod:0}}}:void 0,y=`${o.clientid}:${f}`;if(!Ou[y])Ou[y]=new i0e.XsuaaService(o,h);return Ou[y]}});var Lj=i(function(Bj){Object.defineProperty(Bj,"__esModule",{value:!0});Bj.identityServicesCache=void 0;Bj.getIdentityServiceInstanceFromCredentials=f0e;var Dj=_f(),u0e=se(),Qv=xu(),d0e=u0e.createLogger({package:"connectivity",messageContext:"ias"});Bj.identityServicesCache=new Map;function p0e(o,f){let y=(typeof f==="string"?new Dj.IdentityServiceToken(f):{payload:f}).payload,x=Qv.getIssuerSubdomain(y,!0);if(!x)return d0e.warn("Could not extract subdomain from JWT assertion issuer. Falling back to service binding URL."),{credentials:o,subdomain:x};return{credentials:{...o,url:Qv.replaceSubdomain(o.url,x)},subdomain:x}}function f0e(o,f,h=!1){let y=h?{validation:{jwks:{expirationTime:0,refreshPeriod:0}}}:void 0,x;if(f){let w=p0e(o,f);o=w.credentials,x=w.subdomain}x=x??Qv.getIssuerSubdomain({iss:o.url});let z=`${o.clientid}:${x}:${h}`,C=Bj.identityServicesCache.get(z);if(C===void 0)C=new Dj.IdentityService(o,y),Bj.identityServicesCache.set(z,C);return C}});var mn=i(function(Uo){var m0e=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]}),rc=Uo&&Uo.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))m0e(f,o,h)};Object.defineProperty(Uo,"__esModule",{value:!0});rc(Oj(),Uo);rc(Yv(),Uo);rc(Rj(),Uo);rc(Xv(),Uo);rc(Pj(),Uo);rc(Lj(),Uo)});var qj=i(function(Mj){Object.defineProperty(Mj,"__esModule",{value:!0});Mj.decodeOrMakeJwt=g0e;Mj.getTenantIdFromBinding=jj;var ex=mn(),Nj=_u();function g0e(o){if(o){let h=typeof o==="string"?Nj.decodeJwt(o):o;if(Nj.getTenantId(h))return h}let f=jj();if(f)return{zid:f}}function jj(){return ex.getServiceCredentials("xsuaa")?.tenantid||ex.getServiceCredentials("identity")?.app_tid||ex.getServiceCredentials("destination")?.tenantid}});var Uj=i(function(Fj){Object.defineProperty(Fj,"__esModule",{value:!0})});var Wr=i(function(ri){var v0e=ri&&ri.__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]}),tx=ri&&ri.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))v0e(f,o,h)};Object.defineProperty(ri,"__esModule",{value:!0});tx(qj(),ri);tx(_u(),ri);tx(Uj(),ri)});var Iu=i(function(rx){Object.defineProperty(rx,"__esModule",{value:!0});rx.identityServicesCache=void 0;rx.shouldExchangeToken=w0e;rx.fetchIasToken=S0e;rx.getIasAppTid=O0e;var x0e=Va(),_0e=af(),$j=_f(),z0e=se(),Vj=Wr(),Hj=mn(),C0e=mn();Object.defineProperty(rx,"identityServicesCache",{enumerable:!0,get:function(){return C0e.identityServicesCache}});function w0e(o){return o.iasToXsuaaTokenExchange===!0&&!!o.jwt&&!Vj.isXsuaaToken(Vj.decodeJwt(o.jwt))}async function S0e(o,f={}){let h=Hj.resolveServiceBinding(o),y={serviceCredentials:h.credentials,useCache:f.useCache,...f};return await x0e.executeWithMiddleware(_0e.resilience(),{fn:k0e,fnArgument:y,context:{uri:y.serviceCredentials.url,tenantId:y.serviceCredentials.app_tid}}).catch((z)=>{let w=`Could not fetch IAS client for service "${typeof o==="string"?o:o.name||"unknown"}" of type ${h.label}`;if(z.response?.status===401)w+=". 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 z0e.ErrorWithCause(w+(z.message?`: ${z.message}`:"."),z)})}function E0e(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 T0e(o){let f={token_format:"jwt",...o.resource&&{resource:E0e(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 $j.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 k0e(o){let f=o.authenticationType==="OAuth2JWTBearer"?o.assertion:o.requestAs!=="provider-tenant"?o.jwt:void 0,h=Hj.getIdentityServiceInstanceFromCredentials(o.serviceCredentials,f),y=T0e(o),x=o.useCache!==!1,z=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),C=new $j.IdentityServiceToken(z.access_token);return{access_token:z.access_token,token_type:z.token_type,expires_in:z.expires_in,scope:"",jti:C.payload?.jti??"",aud:C.payload?.aud??[],app_tid:C.appTid,scim_id:C.scimId,ias_apis:C?.consumedApis,custom_iss:C.customIssuer??void 0,refresh_token:z?.refresh_token}}function O0e(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 nx=i(function(Kj){Object.defineProperty(Kj,"__esModule",{value:!0});Kj.clientCredentialsTokenCache=void 0;Kj.getCacheKey=ox;var D0e=se(),B0e=Ds(),Gj=D0e.createLogger({package:"connectivity",messageContext:"client-credentials-token-cache"}),L0e=(o)=>({getToken:(f,h)=>o.get(ox(f,h)),cacheToken:(f,h,y)=>{o.set(ox(f,h),{entry:y,expires:y.expires_in?Date.now()+y.expires_in*1000:void 0})},clear:()=>{o.clear()},getCacheInstance:()=>o});function ox(o,f){if(!o){Gj.warn("Cannot create cache key for client credentials token cache. The given tenant ID is undefined.");return}if(!f){Gj.warn("Cannot create cache key for client credentials token cache. The given client ID is undefined.");return}return[o,f].join(":")}Kj.clientCredentialsTokenCache=L0e(new B0e.Cache(300000))});var ix=i(function(Yj){Object.defineProperty(Yj,"__esModule",{value:!0});Yj.getClientCredentialsToken=j0e;Yj.getUserToken=M0e;var Jj=Va(),Zj=af(),Yf=mn(),oc=Wr();async function j0e(o,f){let h=f?oc.decodeJwt(f):{},y={subdomain:oc.getSubdomain(h),zoneId:oc.getTenantId(h),serviceCredentials:Yf.resolveServiceBinding(o).credentials},x=function(z){return Yf.getXsuaaInstanceFromServiceCredentials(z.serviceCredentials).fetchClientCredentialsToken({tenant:z.zoneId?void 0:z.subdomain,zid:z.zoneId})};return Jj.executeWithMiddleware(Zj.resilience(),{fn:x,fnArgument:y,context:{uri:y.serviceCredentials.url,tenantId:y.zoneId??y.serviceCredentials.tenantid}}).catch((z)=>{throw Error(`Could not fetch client credentials token for service of type ${Yf.resolveServiceBinding(o).label}: ${z.message}`)})}function M0e(o,f){let h=oc.decodeJwt(f),y={subdomain:oc.getSubdomain(h),zoneId:oc.getTenantId(h),serviceCredentials:o.credentials,userJwt:f},x=function(z){return Yf.getXsuaaInstanceFromServiceCredentials(z.serviceCredentials).fetchJwtBearerToken(z.userJwt,{tenant:z.zoneId?void 0:z.subdomain,zid:z.zoneId}).then((w)=>w.access_token)};return Jj.executeWithMiddleware(Zj.resilience(),{fn:x,fnArgument:y,context:{uri:o.credentials.url,tenantId:y.zoneId??o.credentials.tenantid}}).catch((z)=>{throw Error(`Could not fetch JWT bearer token for service of type ${o.label}: ${z.message}`)})}});var Xf=i(function(Qj){Object.defineProperty(Qj,"__esModule",{value:!0});Qj.buildIasDestination=$0e;Qj.buildDestination=Xj;var U0e=Wr();function $0e(o,f,h){let y=Xj(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 Xj(o,f,h,y="OAuth2ClientCredentials"){let x=U0e.decodeJwt(o).exp,z=x?x*1000:void 0,C=Date.now(),w=z?Math.floor((z-C)/1000).toString():void 0;return{url:f,name:h,authentication:y,authTokens:[{value:o,type:"bearer",expiresIn:w,http_header:{key:"Authorization",value:`Bearer ${o}`},error:null}]}}});var Bi=i(function(i4){Object.defineProperty(i4,"__esModule",{value:!0});i4.serviceToken=W0e;i4.jwtBearerToken=J0e;i4.getIasToken=n4;i4.createDestinationFromIasService=Z0e;var G0e=se(),Qf=Wr(),e4=nx(),sx=mn(),t4=ix(),r4=Iu(),K0e=Xf();async function W0e(o,f){let h={useCache:!0,enableCircuitBreaker:!0,...f},y=sx.resolveServiceBinding(o),x=y.credentials,z=f?.jwt?Qf.getTenantId(f.jwt)||Qf.getSubdomain(f.jwt):Qf.getTenantIdFromBinding()||Qf.getDefaultTenantId();if(h.useCache){let C=e4.clientCredentialsTokenCache.getToken(z,x.clientid);if(C)return C.access_token}try{let C=await t4.getClientCredentialsToken(y,f?.jwt);if(h.useCache)e4.clientCredentialsTokenCache.cacheToken(z,x.clientid,C);return C.access_token}catch(C){throw new G0e.ErrorWithCause(`Could not fetch client credentials token for service of type "${y.label}".`,C)}}async function J0e(o,f){let h=sx.resolveServiceBinding(f);return t4.getUserToken(h,o)}async function o4(o){if(typeof o==="string")return sx.resolveServiceBinding(o);return"credentials"in o?o:{name:"identity",label:"identity",tags:[],credentials:o}}async function n4(o="identity",f){let h=f?.useCache!==!1,y=f?.jwt,x={authenticationType:"OAuth2ClientCredentials",...f},z=await o4(o);if(x.authenticationType!=="OAuth2JWTBearer"&&!x.appTid)x.appTid=r4.getIasAppTid(x,z,y);let C=await r4.fetchIasToken(z,{...x,jwt:y,useCache:h});return{token:C.access_token,expiresIn:C.expires_in,refreshToken:C.refresh_token}}async function Z0e(o="identity",f){let h=await o4(o),{token:y}=await n4(h,f),x={authenticationType:"OAuth2ClientCredentials",...f};return K0e.buildIasDestination(y,h,x)}});var eh=i(function(s4){Object.defineProperty(s4,"__esModule",{value:!0});s4.isDestinationFetchOptions=tye;function tye(o){return o.destinationName!==void 0||o.service!==void 0}});var nc=i(function(y4){Object.defineProperty(y4,"__esModule",{value:!0});y4.sanitizeDestination=l4;y4.parseDestination=oye;y4.getAdditionalHeadersAndQueryParameters=d4;y4.getAdditionalHeaders=p4;y4.getAdditionalQueryParameters=f4;y4.getDestinationConfig=h4;y4.toDestinationNameUrl=nye;y4.parseCertificate=m4;y4.isDestinationConfiguration=hye;y4.isDestinationJson=g4;y4.noDestinationErrorMessage=mye;var c4=eh();function l4(o){let f=lye(o);return f=aye(f),f=sye(f),f=uye(f),f=fye(f),f=iye(f),f}function oye(o){let f=h4(o),h=Object.entries(f).reduce((x,[z,C])=>{if(z in a4)x[a4[z]]=C;return x},{originalProperties:o,authTokens:o.authTokens||[],certificates:o.certificates||[]}),y=d4(f);return l4({...h,...y})}function u4(o,f){return Object.entries(o).filter(([y])=>y.startsWith(f)).reduce((y,[x,z])=>{let C=x.replace(f,"");return y[C]=z,y},{})}function d4(o){let f={},h=p4(o).headers;if(h&&Object.keys(h).length)f.headers=h;let y=f4(o).queryParameters;if(y&&Object.keys(y).length)f.queryParameters=y;return f}function p4(o){let f=u4(o,"URL.headers."),h={};if(Object.keys(f).length)h.headers=f;return h}function f4(o){let f=u4(o,"URL.queries."),h={};if(Object.keys(f).length)h.queryParameters=f;return h}function h4(o){return g4(o)?o.destinationConfiguration:o}function nye(o){if(c4.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 iye(o){let f=o.originalProperties?o.originalProperties:o;return{...o,originalProperties:f}}function sye(o){return o.authentication?o:{...o,authentication:pye(o)}}function m4(o){return{name:o.Name||o.name,content:o.Content||o.content,type:o.Type||o.type}}function aye(o){return{...o,certificates:(o.certificates||[]).map((f)=>m4(f))}}function cye(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 lye(o){return{...o,authTokens:(o.authTokens||[]).map((f)=>cye(f))}}function uye(o){return{...o,isTrustingAllCertificates:dye(o.isTrustingAllCertificates)}}function dye(o){if(typeof o==="string")return o.toLowerCase()==="true";return!!o}function pye(o){return o.authentication||o.username&&o.password?"BasicAuthentication":"NoAuthentication"}function fye(o){let f=o.originalProperties?.forwardAuthToken??o.originalProperties?.["HTML5.ForwardAuthToken"]??o.forwardAuthToken;return{...o,forwardAuthToken:f==="true"||f===!0}}function hye(o){return o.URL!==void 0}function g4(o){return Object.keys(o).includes("destinationConfiguration")}var a4={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 mye(o){if(c4.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 th=i(function(v4){Object.defineProperty(v4,"__esModule",{value:!0});v4.getProtocol=b4;var Tye={http:"http",https:"https",socks:"socks"};function b4(o){return o.endsWith(":")?b4(o.slice(0,-1)):Tye[o]}});var Ru=i(function(z4){Object.defineProperty(z4,"__esModule",{value:!0});z4.getAuthHeader=x4;z4.basicHeader=_4;z4.buildAuthorizationHeaders=Bye;var ic=se(),Oye=nc(),rh=ic.createLogger({package:"connectivity",messageContext:"authorization-header"});function x4(o,f){if(o==="PrincipalPropagation"){let y=ic.pickValueIgnoreCase(f,"SAP-Connectivity-Authentication");if(y)return{"SAP-Connectivity-Authentication":y}}let h=ic.pickValueIgnoreCase(f,"authorization");if(h)return{authorization:h}}function Iye(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 Rye(o){if(ic.isNullish(o.username)||ic.isNullish(o.password))throw Error('AuthenticationType is "BasicAuthentication", but "username" and / or "password" are missing!');return{authorization:_4(o.username,o.password)}}function _4(o,f){return"Basic "+ic.encodeBase64(`${o}:${f}`)}function Aye(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 Pye(o){let f=o?.proxyConfiguration?.headers?.["Proxy-Authorization"];if(f)return{"Proxy-Authorization":f}}async function Dye(o){let f=x4(o.authentication,o.headers);if(rh.debug(`Getting authentication related headers for authentication type: ${o.authentication}`),f)return rh.debug("Authentication header from 'destination.headers' used."),f;switch(o.authentication){case null:case void 0:rh.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=Iye(o.authentication,o.authTokens);if(o.authentication==="SAMLAssertion")return rh.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 Rye(o);case"PrincipalPropagation":return Aye(o);default:throw Error(`The destination used "${o.authentication}" as authentication type which is not supported by the SAP Cloud SDK.`)}}async function Bye(o){let f=Oye.sanitizeDestination(o);return{...await Dye(f),...Pye(f)}}});var oh=i(function(C4){Object.defineProperty(C4,"__esModule",{value:!0});C4.getProtocolOrDefault=Uye;var Mye=se(),qye=th(),Fye=Mye.createLogger({package:"connectivity",messageContext:"get-protocol"});function Uye(o){let f=o.url.toLowerCase()?.split("://");if(!f||f.length===1)return Fye.warn(`URL of the provided destination (${o.url}) has no protocol specified! Assuming HTTPS.`),"https";let h=qye.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 Ns=i(function(S4){Object.defineProperty(S4,"__esModule",{value:!0});S4.assertHttpDestination=Vye;S4.isHttpDestination=w4;function Vye(o){if(!w4(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 w4(o){return!!o&&!!o.url&&(!o.type||o.type==="HTTP")}});var js=i(function(I4){Object.defineProperty(I4,"__esModule",{value:!0});I4.proxyStrategy=Yye;I4.parseProxyEnv=O4;I4.addProxyConfigurationInternet=obe;I4.getProxyConfig=nbe;var Kye=c("node:url"),T4=se(),Wye=th(),Jye=Ru(),k4=oh(),Zye=Ns(),$o=T4.createLogger({package:"connectivity",messageContext:"proxy-util"});function Yye(o){if(o.proxyType==="OnPremise")return $o.debug("OnPrem destination proxy settings from connectivity service will be used."),"on-premise";if(o.proxyType==="PrivateLink")return $o.debug("PrivateLink destination proxy settings will be used. This is not supported in local/CI/CD environments."),"private-link";if(Zye.isHttpDestination(o)){let f=k4.getProtocolOrDefault(o);return Xye(f,o.url)}return"no-proxy"}function Xye(o,f){if(!ax(o))return $o.debug(`Could not find proxy settings for ${o} in the environment variables - no proxy used.`),"no-proxy";if(E4().includes(f))return $o.debug(`Destination URL ${f} is in no_proxy list: ${E4()} - no proxy used.`),"no-proxy";if(ax(o))return $o.debug(`Proxy settings for ${o} are found in environment variables.`),"internet";return"no-proxy"}function ax(o){let f=o+"_proxy",h=process.env[f.toLowerCase()]||process.env[f.toUpperCase()];return $o.debug(`Tried to read ${f.toLowerCase()} or ${f.toUpperCase()} from the environment variables. Value is ${h}.`),h||void 0}function E4(){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("*")))$o.warn(`The no_proxy env contains a wildcard ${o}, which is currently not supported`);return f}function Qye(o){if(o.port)return parseInt(o.port);return o.protocol==="https:"?443:80}function ebe(o){let f=o.match(/^[\w.-]+:\/\//);return f?f[0].slice(0,-2):void 0}function tbe(o){if(!ebe(o))return $o.debug('No protocol specified, using "http:".'),`http://${o}`;return o}function rbe(o){if(o.protocol!=="http:"&&o.protocol!=="https:")throw Error(`Unsupported protocol "${o.protocol}".`);if(o.protocol==="https:")$o.debug('Using protocol "https:" to connect to a proxy. This is unusual but possible.');if(o.username&&!o.password)throw Error("Password missing.")}function O4(o){let f=tbe(o);try{let h=new Kye.URL(f);rbe(h);let y={host:h.hostname,protocol:Wye.getProtocol(h.protocol),port:Qye(h)};if(h.username&&h.password)y.headers={"Proxy-Authorization":Jye.basicHeader(decodeURIComponent(h.username),decodeURIComponent(h.password))};if(y){let x={...y,headers:T4.sanitizeRecord(y.headers||{},"Authorization header present. Not logged for security reasons.")};$o.debug(`Used Proxy Configuration: ${JSON.stringify(x,null,2)}.`)}return y}catch(h){$o.warn(`Could not parse proxy configuration from environment variable. Reason: ${h.message}`);return}}function obe(o){let f=ax(k4.getProtocolOrDefault(o));if(f)return{...o,proxyConfiguration:O4(f)||o.proxyConfiguration};return $o.warn("Attempt to get proxy config from environment variables failed. At this point this should not happen - no proxy used."),{...o}}function nbe(o){if(o.proxyConfiguration){let{host:f,protocol:h,port:y}=o.proxyConfiguration;return{host:f,protocol:h,port:y}}return!1}});var sc=i(function(A4){Object.defineProperty(A4,"__esModule",{value:!0});A4.addForwardedAuthTokenIfNeeded=fbe;var lbe=se(),ube=Wr(),R4=lbe.createLogger({package:"connectivity",messageContext:"forward-auth-token"});function dbe(o){let f=ube.decodeJwt(o);return[{value:o,expiresIn:f.exp?.toString(),error:null,http_header:{key:"Authorization",value:`Bearer ${o}`},type:"Bearer"}]}function pbe(o){if(!o)R4.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 fbe(o,f){if(o.forwardAuthToken){if(pbe(f))return R4.debug("Option 'forwardAuthToken' enabled on destination. Using the given token for the destination."),{...o,authTokens:dbe(f)}}return o}});var ux=i(function(N4){Object.defineProperty(N4,"__esModule",{value:!0});N4.getDestinationsFromEnv=B4;N4.getDestinationFromEnvByName=L4;N4.getDestinationsEnvVariable=lx;N4.searchEnvVariablesForDestination=bbe;N4.validateNameAvailable=vbe;N4.setDestinationsInEnv=xbe;var P4=se(),cx=nc(),D4=js(),mbe=Ns(),gbe=sc(),Ms=P4.createLogger({package:"connectivity",messageContext:"env-destination-accessor"});function B4(){let o=lx();if(Ms.debug(`The value for the destination environment variable is: ${o}`),o){let f;try{f=JSON.parse(o)}catch(h){throw new P4.ErrorWithCause("Error in parsing the destinations from the environment variable.",h)}return ybe(f),f.map((h)=>cx.isDestinationConfiguration(h)?cx.parseDestination(h):cx.sanitizeDestination(h))}return[]}function L4(o){let f=B4().filter((h)=>h.name===o);if(!f.length)return null;if(f.length>1)Ms.warn(`The 'destinations' env variable contains multiple destinations with the name '${o}'. Only the first entry will be considered.`);return f[0]}function lx(){return process.env.destinations}function ybe(o){o.forEach((f)=>{if(typeof f.name>"u"&&typeof f.Name>"u")Ms.warn("Destination from 'destinations' env variable is missing 'name' or 'Name' property.")})}function bbe(o){if(Ms.debug("Attempting to retrieve destination from environment variable."),lx())try{let f=L4(o.destinationName);if(f){if(Ms.info(`Successfully retrieved destination '${o.destinationName}' from environment variable.`),f=gbe.addForwardedAuthTokenIfNeeded(f,o.jwt),mbe.isHttpDestination(f)&&["internet","private-link"].includes(D4.proxyStrategy(f)))f=D4.addProxyConfigurationInternet(f);return f}}catch(f){Ms.error(`Error in reading the given destinations from the environment variable ${f.message}.`)}return Ms.debug("No environment variable set."),null}function vbe(o,f){if(f.has(o))throw Error(`Parsing destinations failed, destination with name "${o}" already exists in the "destinations" environment variables.`)}function xbe(o){process.env.destinations=JSON.stringify(o)}});var dx=i(function(j4){Object.defineProperty(j4,"__esModule",{value:!0});j4.serviceToDestinationTransformers=void 0;j4.transformServiceBindingToDestination=Tbe;j4.transformServiceBindingToClientCredentialsDestination=kbe;var oi=Bi(),ii=Xf();j4.serviceToDestinationTransformers={"business-logging":Dbe,"s4-hana-cloud":Lbe,destination:Abe,"saas-registry":Pbe,workflow:Bbe,"service-manager":Rbe,xsuaa:Ibe,aicore:Obe,identity:Nbe};async function Tbe(o,f){if(j4.serviceToDestinationTransformers[o.label])return j4.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 kbe(o,f){let h=await oi.serviceToken(o,f);return ii.buildDestination(h,f?.url??o.url,o.name)}async function Obe(o,f){let h=await oi.serviceToken(o,f);return ii.buildDestination(h,o.credentials.serviceurls.AI_API_URL,o.name)}async function Ibe(o,f){let h=await oi.serviceToken(o,f);return ii.buildDestination(h,o.credentials.apiurl,o.name)}async function Rbe(o,f){let h=await oi.serviceToken(o,f);return ii.buildDestination(h,o.credentials.sm_url,o.name)}async function Abe(o,f){let h=await oi.serviceToken(o,f);return ii.buildDestination(h,o.credentials.uri,o.name)}async function Pbe(o,f){let h=await oi.serviceToken(o,f);return ii.buildDestination(h,o.credentials.saas_registry_url,o.name)}async function Dbe(o,f){let h={...o,credentials:{...o.credentials.uaa}},y=await oi.serviceToken(h,f);return ii.buildDestination(y,o.credentials.writeUrl,o.name)}async function Bbe(o,f){let h={...o,credentials:{...o.credentials.uaa}},y=await oi.serviceToken(h,f);return ii.buildDestination(y,o.credentials.endpoints.workflow_odata_url,o.name)}async function Lbe(o){return{url:o.credentials.URL,authentication:"BasicAuthentication",username:o.credentials.User,password:o.credentials.Password}}async function Nbe(o,f){let h={authenticationType:"OAuth2ClientCredentials",...f?.iasOptions||{}},{token:y}=await oi.getIasToken(o,{jwt:f?.jwt,useCache:f?.useCache!==!1,...h});return ii.buildIasDestination(y,o,h)}});var fx=i(function(U4){Object.defineProperty(U4,"__esModule",{value:!0});U4.getDestinationFromServiceBinding=F4;U4.searchServiceBindingForDestination=Wbe;var qbe=se(),Fbe=Wr(),Ube=mn(),q4=js(),$be=Ns(),M4=dx(),Vbe=sc(),px=qbe.createLogger({package:"connectivity",messageContext:"destination-accessor-vcap"});async function F4(o){let f=o.iss?{iss:o.iss}:o.jwt?Fbe.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 Hbe(y);return x=Vbe.addForwardedAuthTokenIfNeeded(x,o.jwt),$be.isHttpDestination(x)&&["internet","private-link"].includes(q4.proxyStrategy(x))?q4.addProxyConfigurationInternet(x):x}async function Hbe({useCache:o,jwt:f,destinationName:h,iasOptions:y,service:x,serviceBindingTransformFn:z}){let C=x||Ube.getServiceBindingByInstanceName(h),w=await(z||Gbe)(C,{useCache:o,jwt:f,...y?{iasOptions:y}:{}});return{name:x&&C.name||h,...w}}async function Gbe(o,f){if(!M4.serviceToDestinationTransformers[o.label])throw Kbe(o);return M4.serviceToDestinationTransformers[o.label](o,f)}function Kbe(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 Wbe(o){px.debug("Attempting to retrieve destination from service binding.");try{let f=await F4(o);return px.info("Successfully retrieved destination from service binding."),f}catch(f){px.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 mx=i(function(K4){Object.defineProperty(K4,"__esModule",{value:!0});K4.addProxyConfigurationOnPrem=Qbe;K4.httpProxyHostAndPort=H4;K4.socksProxyHostAndPort=G4;var $4=se(),Ybe=mn(),V4=Bi(),Xbe=$4.createLogger({package:"connectivity",messageContext:"connectivity-service"});async function Qbe(o,f){if(o.type==="MAIL")return{...o,proxyConfiguration:await G4(f?.userJwt.decoded)};let h={...H4(),headers:{...await eve(o.authentication,f)}};return{...o,proxyConfiguration:h}}function H4(){let o=hx();return{host:o.credentials.onpremise_proxy_host,port:o.credentials.onpremise_proxy_http_port||o.credentials.onpremise_proxy_port,protocol:"http"}}async function G4(o){let f=hx(),h=await V4.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 hx(){let o=Ybe.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 eve(o,f){let h=await tve(f?.serviceJwt.encoded),y=rve(o,f?.userJwt.encoded);return{...h,...y}}async function tve(o){try{let f=hx();return{"Proxy-Authorization":`Bearer ${await V4.serviceToken(f,{jwt:o})}`}}catch(f){throw new $4.ErrorWithCause("Failed to add proxy authorization header - client credentials grant failed!",f)}}function rve(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")Xbe.warn("You are connecting to an On-Premise system using basic authentication. For productive usage Principal propagation is recommended.");return{}}});var gx=i(function(J4){Object.defineProperty(J4,"__esModule",{value:!0});J4.isIdenticalTenant=sve;var W4=Wr();function sve(o,f){return W4.getTenantId(o)===W4.getTenantId(f)}});var ah=i(function(Y4){Object.defineProperty(Y4,"__esModule",{value:!0});Y4.AsyncCache=void 0;var cve=Ds();class Z4{constructor(o=0){this.cache=new cve.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()}}Y4.AsyncCache=Z4});var ac=i(function(tM){Object.defineProperty(tM,"__esModule",{value:!0});tM.destinationCache=tM.DestinationCache=tM.DefaultDestinationCache=void 0;tM.getDestinationCacheKey=xx;tM.setDestinationCache=hve;tM.getDefaultIsolationStrategy=mve;var eM=se(),ch=Wr(),lve=ah(),bx=eM.createLogger({package:"connectivity",messageContext:"destination-cache"});class vx extends lve.AsyncCache{constructor(o=0){super(o)}}tM.DefaultDestinationCache=vx;var uve=(o=new vx(300000))=>({retrieveDestinationFromCache:async(f,h,y)=>o.get(xx(f,h,y)),cacheRetrievedDestination:async(f,h,y)=>{yx(f,h,y,o)},cacheRetrievedDestinations:async(f,h,y)=>{h.subaccount.forEach((x)=>yx(f,x,y,o)),h.instance.forEach((x)=>yx(f,x,y,o))},clear:async()=>{o.clear()},getCacheInstance:()=>o});tM.DestinationCache=uve;function Q4(o){return o?.serviceJwt?.decoded||o}function dve(o){return o?.userJwt?.decoded||o}function xx(o,f,h="tenant-user"){if(h==="tenant")return pve(f,ch.getTenantId(Q4(o)));if(h==="tenant-user")return fve(f,ch.getTenantId(Q4(o)),ch.userId(dve(o)));bx.warn(`Could not build destination cache key. Isolation strategy '${h}' is not supported.`)}function pve(o,f){if(f)return`${f}::${o}`;bx.warn("Could not build destination cache key. Isolation strategy 'tenant' is used, but tenant ID is undefined in JWT.")}function fve(o,f,h){if(f&&h)return`${h}:${f}:${o}`;bx.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 yx(o,f,h,y){if(!f.name)throw Error("The destination name is undefined.");let x=xx(o,f.name,h),z=eM.first(f.authTokens||[])?.expiresIn,C=z?Date.now()+parseInt(z)*1000:void 0;y.set(x,{entry:f,expires:C})}function hve(o){tM.destinationCache=tM.DestinationCache(o)}tM.destinationCache=tM.DestinationCache();function mve(o){return o&&ch.userId(o)?"tenant-user":"tenant"}});var Cx=i(function(iM){Object.defineProperty(iM,"__esModule",{value:!0});iM.DestinationSelectionStrategies=void 0;iM.alwaysProvider=rM;iM.alwaysSubscriber=oM;iM.subscriberFirst=nM;var xve=se(),_ve=xve.createLogger({package:"connectivity",messageContext:"destination-selection-strategies"});function rM(o,f){return lh(o.provider,f)||null}function oM(o,f){return lh(o.subscriber,f)||null}function nM(o,f){return lh(o.subscriber,f)||lh(o.provider,f)||null}iM.DestinationSelectionStrategies={alwaysProvider:rM,alwaysSubscriber:oM,subscriberFirst:nM};function lh(o,f){let h=(z)=>z.name===f,y=o.instance.find(h),x=o.subaccount.find(h);if(y&&x)_ve.warn(`Found destinations named '${f}' for both, the destination service instance and subaccount. Using instance destination.`);return y||x}});var cM=i(function(aM){Object.defineProperty(aM,"__esModule",{value:!0})});var dM=i(function(VBe,uM){var Sve=c("crypto");class lM{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=Sve.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}}uM.exports=lM});var cc=i(function(HBe,pM){var Eve=(o,f,h)=>Uint8Array.prototype.slice?Uint8Array.prototype.slice.call(o,f,h):o.slice(f,h);pM.exports=Eve});var mM=i(function(GBe,hM){var wx=4294967296,fM=[];for(qs=0;qs<256;qs++)fM[qs]=(qs>15?"":"0")+qs.toString(16);var qs,Au=hM.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)};Au.MAX_INT=Math.pow(2,53);Au.MIN_INT=-Math.pow(2,53);Au.prototype={constructor:Au,_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%wx,o=o/wx,o>wx)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 z=7;z>=0;z--)y[x+z]=f&255,f=z==4?o:f>>>8;if(h)this._2scomp()},toNumber:function(o){var f=this.buffer,h=this.offset,y=f[h]&128,x=0,z=1;for(var C=7,w=1;C>=0;C--,w*=256){var S=f[h+C];if(y)S=(S^255)+z,z=S>>8,S=S&255;x+=S*w}if(!o&&x>=Au.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]=fM[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 Fs=i(function(KBe,yM){var Tve=mM(),kve=cc();class gM{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 kve(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 Tve(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}}yM.exports=gM});var xM=i(function(WBe,vM){var Ove=cc(),Ive=Fs();class bM extends Ive{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(Ove(this.buffer,this.offset,this.offset+o))}}vM.exports=bM});var CM=i(function(JBe,zM){class _M{constructor({certType:o,value:f}){this.certType=o,this.value=f}}zM.exports=_M});var Sx=i(function(ZBe,SM){class wM{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}}SM.exports=wM});var Ex=i(function(YBe,TM){class EM{constructor({alias:o,date:f,cert:h}){this.certType="X.509",this.alias=o,this.date=f,this.cert=h}}TM.exports=EM});var OM=i(function(XBe,kM){var Rve=dM(),Ave=xM(),Pve=Fs(),Dve=CM(),Bve=Sx(),Lve=Ex(),Nve=cc();class ko{constructor(o,f){if(this.keystore=o,this.password=f,f)this.messageDigest=new Rve(f),this.dataInputStream=new Ave(o,this.messageDigest);else this.dataInputStream=new Pve(o)}assertMagic(o){if(o!==ko.MAGIC)throw Error("Invalid keystore format")}assertVersion(o){if(o!==ko.VERSION_1&&o!==ko.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 z=this.dataInputStream.readInt(),C=this.dataInputStream.readUTF(),w=new Date(+this.dataInputStream.readLong().toString());if(z===ko.PRIVATE_KEY_TAG){let S=this.getPrivateKeyEntry(),E=this.readCertificateChain(f),T=new Bve({alias:C,date:w,chain:E,protectedPrivateKey:S});y.push(T)}else if(z===ko.TRUSTED_CERT_TAG){let S=this.readCert(f),E=new Lve({alias:C,date:w,cert:S});y.push(E)}else throw Error("Unrecognized keystore entry")}return this.validateChecksum(),y}validateChecksum(){if(!this.password)return;let o=this.messageDigest.digest(),f=Nve(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===ko.VERSION_2)f=this.dataInputStream.readUTF();let h=this.dataInputStream.read(this.dataInputStream.readInt());return new Dve({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}}ko.MAGIC=4277010157;ko.VERSION_1=1;ko.VERSION_2=2;ko.PRIVATE_KEY_TAG=1;ko.TRUSTED_CERT_TAG=2;kM.exports=ko});var Xe=i(function(QBe,IM){IM.exports={options:{usePureJavaScript:!1}}});var PM=i(function(eLe,AM){var Tx={};AM.exports=Tx;var RM={};Tx.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=jve(o,f);else{var x=0,z=f.length,C=f.charAt(0),w=[0];for(x=0;x<o.length;++x){for(var S=0,E=o[x];S<w.length;++S)E+=w[S]<<8,w[S]=E%z,E=E/z|0;while(E>0)w.push(E%z),E=E/z|0}for(x=0;o[x]===0&&x<o.length-1;++x)y+=C;for(x=w.length-1;x>=0;--x)y+=f[w[x]]}if(h){var T=new RegExp(".{1,"+h+"}","g");y=y.match(T).join(`\r
111
+ `)}return y};Tx.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=RM[f];if(!h){h=RM[f]=[];for(var y=0;y<f.length;++y)h[f.charCodeAt(y)]=y}o=o.replace(/\s/g,"");var x=f.length,z=f.charAt(0),C=[0];for(var y=0;y<o.length;y++){var w=h[o.charCodeAt(y)];if(w===void 0)return;for(var S=0,E=w;S<C.length;++S)E+=C[S]*x,C[S]=E&255,E>>=8;while(E>0)C.push(E&255),E>>=8}for(var T=0;o[T]===z&&T<o.length-1;++T)C.push(0);if(typeof Buffer<"u")return Buffer.from(C.reverse());return new Uint8Array(C.reverse())};function jve(o,f){var h=0,y=f.length,x=f.charAt(0),z=[0];for(h=0;h<o.length();++h){for(var C=0,w=o.at(h);C<z.length;++C)w+=z[C]<<8,z[C]=w%y,w=w/y|0;while(w>0)z.push(w%y),w=w/y|0}var S="";for(h=0;o.at(h)===0&&h<o.length()-1;++h)S+=x;for(h=z.length-1;h>=0;--h)S+=f[z[h]];return S}});var _t=i(function(tLe,NM){var DM=Xe(),BM=PM(),Z=NM.exports=DM.util=DM.util||{};(function(){if(typeof process<"u"&&process.nextTick){if(Z.nextTick=process.nextTick,typeof setImmediate==="function")Z.setImmediate=setImmediate;else Z.setImmediate=Z.nextTick;return}if(typeof setImmediate==="function"){Z.setImmediate=function(){return setImmediate.apply(void 0,arguments)},Z.nextTick=function(w){return setImmediate(w)};return}if(Z.setImmediate=function(w){setTimeout(w,0)},typeof window<"u"&&typeof window.postMessage==="function"){let w=function(S){if(S.source===window&&S.data===o){S.stopPropagation();var E=f.slice();f.length=0,E.forEach(function(T){T()})}};var C=w,o="forge.setImmediate",f=[];Z.setImmediate=function(S){if(f.push(S),f.length===1)window.postMessage(o,"*")},window.addEventListener("message",w,!0)}if(typeof MutationObserver<"u"){var h=Date.now(),y=!0,x=document.createElement("div"),f=[];new MutationObserver(function(){var S=f.slice();f.length=0,S.forEach(function(E){E()})}).observe(x,{attributes:!0});var z=Z.setImmediate;Z.setImmediate=function(S){if(Date.now()-h>15)h=Date.now(),z(S);else if(f.push(S),f.length===1)x.setAttribute("a",y=!y)}}Z.nextTick=Z.setImmediate})();Z.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;Z.globalScope=function(){if(Z.isNodejs)return global;return typeof self>"u"?window:self}();Z.isArray=Array.isArray||function(o){return Object.prototype.toString.call(o)==="[object Array]"};Z.isArrayBuffer=function(o){return typeof ArrayBuffer<"u"&&o instanceof ArrayBuffer};Z.isArrayBufferView=function(o){return o&&Z.isArrayBuffer(o.buffer)&&o.byteLength!==void 0};function Pu(o){if(!(o===8||o===16||o===24||o===32))throw Error("Only 8, 16, 24, or 32 bits supported: "+o)}Z.ByteBuffer=kx;function kx(o){if(this.data="",this.read=0,typeof o==="string")this.data=o;else if(Z.isArrayBuffer(o)||Z.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 kx||typeof o==="object"&&typeof o.data==="string"&&typeof o.read==="number")this.data=o.data,this.read=o.read;this._constructedStringLength=0}Z.ByteStringBuffer=kx;var Mve=4096;Z.ByteStringBuffer.prototype._optimizeConstructedString=function(o){if(this._constructedStringLength+=o,this._constructedStringLength>Mve)this.data.substr(0,1),this._constructedStringLength=0};Z.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};Z.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};Z.ByteStringBuffer.prototype.putByte=function(o){return this.putBytes(String.fromCharCode(o))};Z.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};Z.ByteStringBuffer.prototype.putBytes=function(o){return this.data+=o,this._optimizeConstructedString(o.length),this};Z.ByteStringBuffer.prototype.putString=function(o){return this.putBytes(Z.encodeUtf8(o))};Z.ByteStringBuffer.prototype.putInt16=function(o){return this.putBytes(String.fromCharCode(o>>8&255)+String.fromCharCode(o&255))};Z.ByteStringBuffer.prototype.putInt24=function(o){return this.putBytes(String.fromCharCode(o>>16&255)+String.fromCharCode(o>>8&255)+String.fromCharCode(o&255))};Z.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))};Z.ByteStringBuffer.prototype.putInt16Le=function(o){return this.putBytes(String.fromCharCode(o&255)+String.fromCharCode(o>>8&255))};Z.ByteStringBuffer.prototype.putInt24Le=function(o){return this.putBytes(String.fromCharCode(o&255)+String.fromCharCode(o>>8&255)+String.fromCharCode(o>>16&255))};Z.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))};Z.ByteStringBuffer.prototype.putInt=function(o,f){Pu(f);var h="";do f-=8,h+=String.fromCharCode(o>>f&255);while(f>0);return this.putBytes(h)};Z.ByteStringBuffer.prototype.putSignedInt=function(o,f){if(o<0)o+=2<<f-1;return this.putInt(o,f)};Z.ByteStringBuffer.prototype.putBuffer=function(o){return this.putBytes(o.getBytes())};Z.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};Z.ByteStringBuffer.prototype.getInt16=function(){var o=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,o};Z.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};Z.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};Z.ByteStringBuffer.prototype.getInt16Le=function(){var o=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,o};Z.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};Z.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};Z.ByteStringBuffer.prototype.getInt=function(o){Pu(o);var f=0;do f=(f<<8)+this.data.charCodeAt(this.read++),o-=8;while(o>0);return f};Z.ByteStringBuffer.prototype.getSignedInt=function(o){var f=this.getInt(o),h=2<<o-2;if(f>=h)f-=h<<1;return f};Z.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};Z.ByteStringBuffer.prototype.bytes=function(o){return typeof o>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+o)};Z.ByteStringBuffer.prototype.at=function(o){return this.data.charCodeAt(this.read+o)};Z.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};Z.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};Z.ByteStringBuffer.prototype.copy=function(){var o=Z.createBuffer(this.data);return o.read=this.read,o};Z.ByteStringBuffer.prototype.compact=function(){if(this.read>0)this.data=this.data.slice(this.read),this.read=0;return this};Z.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};Z.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};Z.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};Z.ByteStringBuffer.prototype.toString=function(){return Z.decodeUtf8(this.bytes())};function qve(o,f){f=f||{},this.read=f.readOffset||0,this.growSize=f.growSize||1024;var h=Z.isArrayBuffer(o),y=Z.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}Z.DataBuffer=qve;Z.DataBuffer.prototype.length=function(){return this.write-this.read};Z.DataBuffer.prototype.isEmpty=function(){return this.length()<=0};Z.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};Z.DataBuffer.prototype.putByte=function(o){return this.accommodate(1),this.data.setUint8(this.write++,o),this};Z.DataBuffer.prototype.fillWithByte=function(o,f){this.accommodate(f);for(var h=0;h<f;++h)this.data.setUint8(o);return this};Z.DataBuffer.prototype.putBytes=function(o,f){if(Z.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(Z.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 Z.DataBuffer||typeof o==="object"&&typeof o.read==="number"&&typeof o.write==="number"&&Z.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 Z.ByteStringBuffer)o=o.data,f="binary";if(f=f||"binary",typeof o==="string"){var z;if(f==="hex")return this.accommodate(Math.ceil(o.length/2)),z=new Uint8Array(this.data.buffer,this.write),this.write+=Z.binary.hex.decode(o,z,this.write),this;if(f==="base64")return this.accommodate(Math.ceil(o.length/4)*3),z=new Uint8Array(this.data.buffer,this.write),this.write+=Z.binary.base64.decode(o,z,this.write),this;if(f==="utf8")o=Z.encodeUtf8(o),f="binary";if(f==="binary"||f==="raw")return this.accommodate(o.length),z=new Uint8Array(this.data.buffer,this.write),this.write+=Z.binary.raw.decode(z),this;if(f==="utf16")return this.accommodate(o.length*2),z=new Uint16Array(this.data.buffer,this.write),this.write+=Z.text.utf16.encode(z),this;throw Error("Invalid encoding: "+f)}throw Error("Invalid parameter: "+o)};Z.DataBuffer.prototype.putBuffer=function(o){return this.putBytes(o),o.clear(),this};Z.DataBuffer.prototype.putString=function(o){return this.putBytes(o,"utf16")};Z.DataBuffer.prototype.putInt16=function(o){return this.accommodate(2),this.data.setInt16(this.write,o),this.write+=2,this};Z.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};Z.DataBuffer.prototype.putInt32=function(o){return this.accommodate(4),this.data.setInt32(this.write,o),this.write+=4,this};Z.DataBuffer.prototype.putInt16Le=function(o){return this.accommodate(2),this.data.setInt16(this.write,o,!0),this.write+=2,this};Z.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};Z.DataBuffer.prototype.putInt32Le=function(o){return this.accommodate(4),this.data.setInt32(this.write,o,!0),this.write+=4,this};Z.DataBuffer.prototype.putInt=function(o,f){Pu(f),this.accommodate(f/8);do f-=8,this.data.setInt8(this.write++,o>>f&255);while(f>0);return this};Z.DataBuffer.prototype.putSignedInt=function(o,f){if(Pu(f),this.accommodate(f/8),o<0)o+=2<<f-1;return this.putInt(o,f)};Z.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};Z.DataBuffer.prototype.getInt16=function(){var o=this.data.getInt16(this.read);return this.read+=2,o};Z.DataBuffer.prototype.getInt24=function(){var o=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,o};Z.DataBuffer.prototype.getInt32=function(){var o=this.data.getInt32(this.read);return this.read+=4,o};Z.DataBuffer.prototype.getInt16Le=function(){var o=this.data.getInt16(this.read,!0);return this.read+=2,o};Z.DataBuffer.prototype.getInt24Le=function(){var o=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,o};Z.DataBuffer.prototype.getInt32Le=function(){var o=this.data.getInt32(this.read,!0);return this.read+=4,o};Z.DataBuffer.prototype.getInt=function(o){Pu(o);var f=0;do f=(f<<8)+this.data.getInt8(this.read++),o-=8;while(o>0);return f};Z.DataBuffer.prototype.getSignedInt=function(o){var f=this.getInt(o),h=2<<o-2;if(f>=h)f-=h<<1;return f};Z.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};Z.DataBuffer.prototype.bytes=function(o){return typeof o>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+o)};Z.DataBuffer.prototype.at=function(o){return this.data.getUint8(this.read+o)};Z.DataBuffer.prototype.setAt=function(o,f){return this.data.setUint8(o,f),this};Z.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};Z.DataBuffer.prototype.copy=function(){return new Z.DataBuffer(this)};Z.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};Z.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};Z.DataBuffer.prototype.truncate=function(o){return this.write=Math.max(0,this.length()-o),this.read=Math.min(this.read,this.write),this};Z.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};Z.DataBuffer.prototype.toString=function(o){var f=new Uint8Array(this.data,this.read,this.length());if(o=o||"utf8",o==="binary"||o==="raw")return Z.binary.raw.encode(f);if(o==="hex")return Z.binary.hex.encode(f);if(o==="base64")return Z.binary.base64.encode(f);if(o==="utf8")return Z.text.utf8.decode(f);if(o==="utf16")return Z.text.utf16.decode(f);throw Error("Invalid encoding: "+o)};Z.createBuffer=function(o,f){if(f=f||"raw",o!==void 0&&f==="utf8")o=Z.encodeUtf8(o);return new Z.ByteBuffer(o)};Z.fillString=function(o,f){var h="";while(f>0){if(f&1)h+=o;if(f>>>=1,f>0)o+=o}return h};Z.xorBytes=function(o,f,h){var y="",x="",z="",C=0,w=0;for(;h>0;--h,++C){if(x=o.charCodeAt(C)^f.charCodeAt(C),w>=10)y+=z,z="",w=0;z+=String.fromCharCode(x),++w}return y+=z,y};Z.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};Z.bytesToHex=function(o){return Z.createBuffer(o).toHex()};Z.int32ToBytes=function(o){return String.fromCharCode(o>>24&255)+String.fromCharCode(o>>16&255)+String.fromCharCode(o>>8&255)+String.fromCharCode(o&255)};var Ni="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ji=[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],LM="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";Z.encode64=function(o,f){var h="",y="",x,z,C,w=0;while(w<o.length){if(x=o.charCodeAt(w++),z=o.charCodeAt(w++),C=o.charCodeAt(w++),h+=Ni.charAt(x>>2),h+=Ni.charAt((x&3)<<4|z>>4),isNaN(z))h+="==";else h+=Ni.charAt((z&15)<<2|C>>6),h+=isNaN(C)?"=":Ni.charAt(C&63);if(f&&h.length>f)y+=h.substr(0,f)+`\r
112
+ `,h=h.substr(f)}return y+=h,y};Z.decode64=function(o){o=o.replace(/[^A-Za-z0-9\+\/\=]/g,"");var f="",h,y,x,z,C=0;while(C<o.length)if(h=ji[o.charCodeAt(C++)-43],y=ji[o.charCodeAt(C++)-43],x=ji[o.charCodeAt(C++)-43],z=ji[o.charCodeAt(C++)-43],f+=String.fromCharCode(h<<2|y>>4),x!==64){if(f+=String.fromCharCode((y&15)<<4|x>>2),z!==64)f+=String.fromCharCode((x&3)<<6|z)}return f};Z.encodeUtf8=function(o){return unescape(encodeURIComponent(o))};Z.decodeUtf8=function(o){return decodeURIComponent(escape(o))};Z.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:BM.encode,decode:BM.decode}};Z.binary.raw.encode=function(o){return String.fromCharCode.apply(null,o)};Z.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 z=0;z<o.length;++z)y[x++]=o.charCodeAt(z);return f?x-h:y};Z.binary.hex.encode=Z.bytesToHex;Z.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,z=h;if(o.length&1)x=1,y[z++]=parseInt(o[0],16);for(;x<o.length;x+=2)y[z++]=parseInt(o.substr(x,2),16);return f?z-h:y};Z.binary.base64.encode=function(o,f){var h="",y="",x,z,C,w=0;while(w<o.byteLength){if(x=o[w++],z=o[w++],C=o[w++],h+=Ni.charAt(x>>2),h+=Ni.charAt((x&3)<<4|z>>4),isNaN(z))h+="==";else h+=Ni.charAt((z&15)<<2|C>>6),h+=isNaN(C)?"=":Ni.charAt(C&63);if(f&&h.length>f)y+=h.substr(0,f)+`\r
113
+ `,h=h.substr(f)}return y+=h,y};Z.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,S=0,E=h;while(S<o.length)if(x=ji[o.charCodeAt(S++)-43],z=ji[o.charCodeAt(S++)-43],C=ji[o.charCodeAt(S++)-43],w=ji[o.charCodeAt(S++)-43],y[E++]=x<<2|z>>4,C!==64){if(y[E++]=(z&15)<<4|C>>2,w!==64)y[E++]=(C&3)<<6|w}return f?E-h:y.subarray(0,E)};Z.binary.base58.encode=function(o,f){return Z.binary.baseN.encode(o,LM,f)};Z.binary.base58.decode=function(o,f){return Z.binary.baseN.decode(o,LM,f)};Z.text={utf8:{},utf16:{}};Z.text.utf8.encode=function(o,f,h){o=Z.encodeUtf8(o);var y=f;if(!y)y=new Uint8Array(o.length);h=h||0;var x=h;for(var z=0;z<o.length;++z)y[x++]=o.charCodeAt(z);return f?x-h:y};Z.text.utf8.decode=function(o){return Z.decodeUtf8(String.fromCharCode.apply(null,o))};Z.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 z=h,C=h;for(var w=0;w<o.length;++w)x[C++]=o.charCodeAt(w),z+=2;return f?z-h:y};Z.text.utf16.decode=function(o){return String.fromCharCode.apply(null,new Uint16Array(o.buffer))};Z.deflate=function(o,f,h){if(f=Z.decode64(o.deflate(Z.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};Z.inflate=function(o,f,h){var y=o.inflate(Z.encode64(f)).rval;return y===null?null:Z.decode64(y)};var Ox=function(o,f,h){if(!o)throw Error("WebStorage not available.");var y;if(h===null)y=o.removeItem(f);else h=Z.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}},Ix=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(Z.decode64(h));return h},Fve=function(o,f,h,y){var x=Ix(o,f);if(x===null)x={};x[h]=y,Ox(o,f,x)},Uve=function(o,f,h){var y=Ix(o,f);if(y!==null)y=h in y?y[h]:null;return y},$ve=function(o,f,h){var y=Ix(o,f);if(y!==null&&h in y){delete y[h];var x=!0;for(var z in y){x=!1;break}if(x)y=null;Ox(o,f,y)}},Vve=function(o,f){Ox(o,f,null)},uh=function(o,f,h){var y=null;if(typeof h>"u")h=["web","flash"];var x,z=!1,C=null;for(var w in h){x=h[w];try{if(x==="flash"||x==="both"){if(f[0]===null)throw Error("Flash local storage not available.");y=o.apply(this,f),z=x==="flash"}if(x==="web"||x==="both")f[0]=localStorage,y=o.apply(this,f),z=!0}catch(S){C=S}if(z)break}if(!z)throw C;return y};Z.setItem=function(o,f,h,y,x){uh(Fve,arguments,x)};Z.getItem=function(o,f,h,y){return uh(Uve,arguments,y)};Z.removeItem=function(o,f,h,y){uh($ve,arguments,y)};Z.clearItems=function(o,f,h){uh(Vve,arguments,h)};Z.isEmpty=function(o){for(var f in o)if(o.hasOwnProperty(f))return!1;return!0};Z.format=function(o){var f=/%./g,h,y,x=0,z=[],C=0;while(h=f.exec(o)){if(y=o.substring(C,f.lastIndex-2),y.length>0)z.push(y);C=f.lastIndex;var w=h[0][1];switch(w){case"s":case"o":if(x<arguments.length)z.push(arguments[x+++1]);else z.push("<?>");break;case"%":z.push("%");break;default:z.push("<%"+w+"?>")}}return z.push(o.substring(C)),z.join("")};Z.formatNumber=function(o,f,h,y){var x=o,z=isNaN(f=Math.abs(f))?2:f,C=h===void 0?",":h,w=y===void 0?".":y,S=x<0?"-":"",E=parseInt(x=Math.abs(+x||0).toFixed(z),10)+"",T=E.length>3?E.length%3:0;return S+(T?E.substr(0,T)+w:"")+E.substr(T).replace(/(\d{3})(?=\d)/g,"$1"+w)+(z?C+Math.abs(x-E).toFixed(z).slice(2):"")};Z.formatSize=function(o){if(o>=1073741824)o=Z.formatNumber(o/1073741824,2,".","")+" GiB";else if(o>=1048576)o=Z.formatNumber(o/1048576,2,".","")+" MiB";else if(o>=1024)o=Z.formatNumber(o/1024,0)+" KiB";else o=Z.formatNumber(o,0)+" bytes";return o};Z.bytesFromIP=function(o){if(o.indexOf(".")!==-1)return Z.bytesFromIPv4(o);if(o.indexOf(":")!==-1)return Z.bytesFromIPv6(o);return null};Z.bytesFromIPv4=function(o){if(o=o.split("."),o.length!==4)return null;var f=Z.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()};Z.bytesFromIPv6=function(o){var f=0;o=o.split(":").filter(function(C){if(C.length===0)++f;return!0});var h=(8-o.length+f)*2,y=Z.createBuffer();for(var x=0;x<8;++x){if(!o[x]||o[x].length===0){y.fillWithByte(0,h),h=0;continue}var z=Z.hexToBytes(o[x]);if(z.length<2)y.putByte(0);y.putBytes(z)}return y.getBytes()};Z.bytesToIP=function(o){if(o.length===4)return Z.bytesToIPv4(o);if(o.length===16)return Z.bytesToIPv6(o);return null};Z.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(".")};Z.bytesToIPv6=function(o){if(o.length!==16)return null;var f=[],h=[],y=0;for(var x=0;x<o.length;x+=2){var z=Z.bytesToHex(o[x]+o[x+1]);while(z[0]==="0"&&z!=="0")z=z.substr(1);if(z==="0"){var C=h[h.length-1],w=f.length;if(!C||w!==C.end+1)h.push({start:w,end:w});else if(C.end=w,C.end-C.start>h[y].end-h[y].start)y=h.length-1}f.push(z)}if(h.length>0){var S=h[y];if(S.end-S.start>0){if(f.splice(S.start,S.end-S.start+1,""),S.start===0)f.unshift("");if(S.end===7)f.push("")}}return f.join(":")};Z.estimateCores=function(o,f){if(typeof o==="function")f=o,o={};if(o=o||{},"cores"in Z&&!o.update)return f(null,Z.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return Z.cores=navigator.hardwareConcurrency,f(null,Z.cores);if(typeof Worker>"u")return Z.cores=1,f(null,Z.cores);if(typeof Blob>"u")return Z.cores=2,f(null,Z.cores);var h=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(C){var w=Date.now(),S=w+4;while(Date.now()<S);self.postMessage({st:w,et:S})})}.toString(),")()"],{type:"application/javascript"}));y([],5,16);function y(C,w,S){if(w===0){var E=Math.floor(C.reduce(function(T,k){return T+k},0)/C.length);return Z.cores=Math.max(1,E),URL.revokeObjectURL(h),f(null,Z.cores)}x(S,function(T,k){C.push(z(S,k)),y(C,w-1,S)})}function x(C,w){var S=[],E=[];for(var T=0;T<C;++T){var k=new Worker(h);k.addEventListener("message",function(O){if(E.push(O.data),E.length===C){for(var R=0;R<C;++R)S[R].terminate();w(null,E)}}),S.push(k)}for(var T=0;T<C;++T)S[T].postMessage(T)}function z(C,w){var S=[];for(var E=0;E<C;++E){var T=w[E],k=S[E]=[];for(var O=0;O<C;++O){if(E===O)continue;var R=w[O];if(T.st>R.st&&T.st<R.et||R.st>T.st&&R.st<T.et)k.push(O)}}return S.reduce(function(I,A){return Math.max(I,A.length)},0)}}});var dh=i(function(rLe,jM){var wr=Xe();_t();jM.exports=wr.cipher=wr.cipher||{};wr.cipher.algorithms=wr.cipher.algorithms||{};wr.cipher.createCipher=function(o,f){var h=o;if(typeof h==="string"){if(h=wr.cipher.getAlgorithm(h),h)h=h()}if(!h)throw Error("Unsupported algorithm: "+o);return new wr.cipher.BlockCipher({algorithm:h,key:f,decrypt:!1})};wr.cipher.createDecipher=function(o,f){var h=o;if(typeof h==="string"){if(h=wr.cipher.getAlgorithm(h),h)h=h()}if(!h)throw Error("Unsupported algorithm: "+o);return new wr.cipher.BlockCipher({algorithm:h,key:f,decrypt:!0})};wr.cipher.registerAlgorithm=function(o,f){o=o.toUpperCase(),wr.cipher.algorithms[o]=f};wr.cipher.getAlgorithm=function(o){if(o=o.toUpperCase(),o in wr.cipher.algorithms)return wr.cipher.algorithms[o];return null};var Rx=wr.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)};Rx.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=wr.util.createBuffer(),this.output=o.output||wr.util.createBuffer(),this.mode.start(f)};Rx.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()};Rx.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 Px=i(function(oLe,MM){var Sr=Xe();_t();Sr.cipher=Sr.cipher||{};var ot=MM.exports=Sr.cipher.modes=Sr.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();if(h===0)return!0;var y=o.at(h-1);if(y===0||y>this.blockSize||y>h)return!1;for(var x=2;x<=y;++x)if(o.at(h-x)!==y)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=ph(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();if(h===0)return!0;var y=o.at(h-1);if(y===0||y>this.blockSize||y>h)return!1;for(var x=2;x<=y;++x)if(o.at(h-x)!==y)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=Sr.util.createBuffer(),this._partialBytes=0};ot.cfb.prototype.start=function(o){if(!("iv"in o))throw Error("Invalid IV parameter.");this._iv=ph(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 z=(this.blockSize-y)%this.blockSize;if(z>0)z=this.blockSize-z;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(z>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(z>0&&!h)return f.putBytes(this._partialOutput.getBytes(z-this._partialBytes)),this._partialBytes=z,!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 z=(this.blockSize-y)%this.blockSize;if(z>0)z=this.blockSize-z;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(z>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(z>0&&!h)return f.putBytes(this._partialOutput.getBytes(z-this._partialBytes)),this._partialBytes=z,!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=Sr.util.createBuffer(),this._partialBytes=0};ot.ofb.prototype.start=function(o){if(!("iv"in o))throw Error("Invalid IV parameter.");this._iv=ph(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 z=(this.blockSize-y)%this.blockSize;if(z>0)z=this.blockSize-z;this._partialOutput.clear();for(var x=0;x<this._ints;++x)this._partialOutput.putInt32(o.getInt32()^this._outBlock[x]);if(z>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(z>0&&!h)return f.putBytes(this._partialOutput.getBytes(z-this._partialBytes)),this._partialBytes=z,!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=Sr.util.createBuffer(),this._partialBytes=0};ot.ctr.prototype.start=function(o){if(!("iv"in o))throw Error("Invalid IV parameter.");this._iv=ph(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 z=(this.blockSize-y)%this.blockSize;if(z>0)z=this.blockSize-z;this._partialOutput.clear();for(var x=0;x<this._ints;++x)this._partialOutput.putInt32(o.getInt32()^this._outBlock[x]);if(z>0)o.read-=this.blockSize;if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if(z>0&&!h)return f.putBytes(this._partialOutput.getBytes(z-this._partialBytes)),this._partialBytes=z,!0;f.putBytes(this._partialOutput.getBytes(y-this._partialBytes)),this._partialBytes=0}fh(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=Sr.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=Sr.util.createBuffer(o.iv);this._cipherLength=0;var h;if("additionalData"in o)h=Sr.util.createBuffer(o.additionalData);else h=Sr.util.createBuffer();if(o.tagLength!==void 0&&o.tagLength!==null)this._tagLength=Number(o.tagLength);else this._tagLength=128;if([128,120,112,104,96,64,32].indexOf(this._tagLength)===-1)throw Error("Invalid tag length.");if(this._tag=null,o.decrypt){if(this._tag=Sr.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(Ax(y*8)))}this._inBlock=this._j0.slice(0),fh(this._inBlock),this._partialBytes=0,h=Sr.util.createBuffer(h),this._aDataLength=Ax(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 z=(this.blockSize-y)%this.blockSize;if(z>0)z=this.blockSize-z;this._partialOutput.clear();for(var x=0;x<this._ints;++x)this._partialOutput.putInt32(o.getInt32()^this._outBlock[x]);if(z<=0||h){if(h){var C=y%this.blockSize;this._cipherLength+=C,this._partialOutput.truncate(this.blockSize-C)}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(z>0&&!h)return o.read-=this.blockSize,f.putBytes(this._partialOutput.getBytes(z-this._partialBytes)),this._partialBytes=z,!0;f.putBytes(this._partialOutput.getBytes(y-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),fh(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),fh(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=Sr.util.createBuffer();var y=this._aDataLength.concat(Ax(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,y);var x=[];this.cipher.encrypt(this._j0,x);for(var z=0;z<this._ints;++z)this.tag.putInt32(this._s[z]^x[z]);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 z=o[x/32|0]&1<<31-x%32;if(z)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,z=this._m[h][x];f[0]^=z[0],f[1]^=z[1],f[2]^=z[2],f[3]^=z[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,z=Array(x);for(var C=0;C<x;++C){var w=[0,0,0,0],S=C/y|0,E=(y-1-C%y)*f;w[S]=1<<f-1<<E,z[C]=this.generateSubHashTable(this.multiply(w,o),f)}return z};ot.gcm.prototype.generateSubHashTable=function(o,f){var h=1<<f,y=h>>>1,x=Array(h);x[y]=o.slice(0);var z=y>>>1;while(z>0)this.pow(x[2*z],x[z]=[]),z>>=1;z=2;while(z<y){for(var C=1;C<z;++C){var w=x[z],S=x[C];x[z+C]=[w[0]^S[0],w[1]^S[1],w[2]^S[2],w[3]^S[3]]}z*=2}x[0]=[0,0,0,0];for(z=y+1;z<h;++z){var E=x[z^y];x[z]=[o[0]^E[0],o[1]^E[1],o[2]^E[2],o[3]^E[3]]}return x};function ph(o,f){if(typeof o==="string")o=Sr.util.createBuffer(o);if(Sr.util.isArray(o)&&o.length>4){var h=o;o=Sr.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(!Sr.util.isArray(o)){var x=[],z=f/4;for(var y=0;y<z;++y)x.push(o.getInt32());o=x}return o}function fh(o){o[o.length-1]=o[o.length-1]+1&4294967295}function Ax(o){return[o/4294967296|0,o&4294967295]}});var Mi=i(function(nLe,$M){var qt=Xe();dh();Px();_t();$M.exports=qt.aes=qt.aes||{};qt.aes.startEncrypting=function(o,f,h,y){var x=hh({key:o,output:h,decrypt:!1,mode:y});return x.start(f),x};qt.aes.createEncryptionCipher=function(o,f){return hh({key:o,output:null,decrypt:!1,mode:f})};qt.aes.startDecrypting=function(o,f,h,y){var x=hh({key:o,output:h,decrypt:!0,mode:y});return x.start(f),x};qt.aes.createDecryptionCipher=function(o,f){return hh({key:o,output:null,decrypt:!0,mode:f})};qt.aes.Algorithm=function(o,f){if(!Lx)FM();var h=this;h.name=o,h.mode=new f({blockSize:16,cipher:{encrypt:function(y,x){return Bx(h._w,y,x,!1)},decrypt:function(y,x){return Bx(h._w,y,x,!0)}}}),h._init=!1};qt.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=qt.util.createBuffer(f);else if(qt.util.isArray(f)&&(f.length===16||f.length===24||f.length===32)){h=f,f=qt.util.createBuffer();for(var y=0;y<h.length;++y)f.putByte(h[y])}if(!qt.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(!qt.util.isArray(f)||!(f.length===4||f.length===6||f.length===8))throw Error("Invalid key parameter.");var z=this.mode.name,C=["CFB","OFB","CTR","GCM"].indexOf(z)!==-1;this._w=UM(f,o.decrypt&&!C),this._init=!0};qt.aes._expandKey=function(o,f){if(!Lx)FM();return UM(o,f)};qt.aes._updateBlock=Bx;uc("AES-ECB",qt.cipher.modes.ecb);uc("AES-CBC",qt.cipher.modes.cbc);uc("AES-CFB",qt.cipher.modes.cfb);uc("AES-OFB",qt.cipher.modes.ofb);uc("AES-CTR",qt.cipher.modes.ctr);uc("AES-GCM",qt.cipher.modes.gcm);function uc(o,f){var h=function(){return new qt.aes.Algorithm(o,f)};qt.cipher.registerAlgorithm(o,h)}var Lx=!1,lc=4,eo,Dx,qM,Us,gn;function FM(){Lx=!0,qM=[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;eo=Array(256),Dx=Array(256),Us=[,,,,],gn=[,,,,];for(var f=0;f<4;++f)Us[f]=Array(256),gn[f]=Array(256);var h=0,y=0,x,z,C,w,S,E,T;for(var f=0;f<256;++f){w=y^y<<1^y<<2^y<<3^y<<4,w=w>>8^w&255^99,eo[h]=w,Dx[w]=h,S=o[w],x=o[h],z=o[x],C=o[z],E=S<<24^w<<16^w<<8^(w^S),T=(x^z^C)<<24^(h^C)<<16^(h^z^C)<<8^(h^x^C);for(var k=0;k<4;++k)Us[k][h]=E,gn[k][w]=T,E=E<<24|E>>>8,T=T<<24|T>>>8;if(h===0)h=y=1;else h=x^o[o[o[x^C]]],y^=o[o[y]]}}function UM(o,f){var h=o.slice(0),y,x=1,z=h.length,C=z+6+1,w=lc*C;for(var S=z;S<w;++S){if(y=h[S-1],S%z===0)y=eo[y>>>16&255]<<24^eo[y>>>8&255]<<16^eo[y&255]<<8^eo[y>>>24]^qM[x]<<24,x++;else if(z>6&&S%z===4)y=eo[y>>>24]<<24^eo[y>>>16&255]<<16^eo[y>>>8&255]<<8^eo[y&255];h[S]=h[S-z]^y}if(f){var E,T=gn[0],k=gn[1],O=gn[2],R=gn[3],I=h.slice(0);w=h.length;for(var S=0,A=w-lc;S<w;S+=lc,A-=lc)if(S===0||S===w-lc)I[S]=h[A],I[S+1]=h[A+3],I[S+2]=h[A+2],I[S+3]=h[A+1];else for(var j=0;j<lc;++j)E=h[A+j],I[S+(3&-j)]=T[eo[E>>>24]]^k[eo[E>>>16&255]]^O[eo[E>>>8&255]]^R[eo[E&255]];h=I}return h}function Bx(o,f,h,y){var x=o.length/4-1,z,C,w,S,E;if(y)z=gn[0],C=gn[1],w=gn[2],S=gn[3],E=Dx;else z=Us[0],C=Us[1],w=Us[2],S=Us[3],E=eo;var T,k,O,R,I,A,j;T=f[0]^o[0],k=f[y?3:1]^o[1],O=f[2]^o[2],R=f[y?1:3]^o[3];var P=3;for(var F=1;F<x;++F)I=z[T>>>24]^C[k>>>16&255]^w[O>>>8&255]^S[R&255]^o[++P],A=z[k>>>24]^C[O>>>16&255]^w[R>>>8&255]^S[T&255]^o[++P],j=z[O>>>24]^C[R>>>16&255]^w[T>>>8&255]^S[k&255]^o[++P],R=z[R>>>24]^C[T>>>16&255]^w[k>>>8&255]^S[O&255]^o[++P],T=I,k=A,O=j;h[0]=E[T>>>24]<<24^E[k>>>16&255]<<16^E[O>>>8&255]<<8^E[R&255]^o[++P],h[y?3:1]=E[k>>>24]<<24^E[O>>>16&255]<<16^E[R>>>8&255]<<8^E[T&255]^o[++P],h[2]=E[O>>>24]<<24^E[R>>>16&255]<<16^E[T>>>8&255]<<8^E[k&255]^o[++P],h[y?1:3]=E[R>>>24]<<24^E[T>>>16&255]<<16^E[k>>>8&255]<<8^E[O&255]^o[++P]}function hh(o){o=o||{};var f=(o.mode||"CBC").toUpperCase(),h="AES-"+f,y;if(o.decrypt)y=qt.cipher.createDecipher(h,o.key);else y=qt.cipher.createCipher(h,o.key);var x=y.start;return y.start=function(z,C){var w=null;if(C instanceof qt.util.ByteBuffer)w=C,C={};C=C||{},C.output=w,C.iv=z,x.call(y,C)},y}});var qi=i(function(iLe,VM){var Du=Xe();Du.pki=Du.pki||{};var Nx=VM.exports=Du.pki.oids=Du.oids=Du.oids||{};function fe(o,f){Nx[o]=f,Nx[f]=o}function kt(o,f){Nx[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");kt("2.5.29.1","authorityKeyIdentifier");kt("2.5.29.2","keyAttributes");kt("2.5.29.3","certificatePolicies");kt("2.5.29.4","keyUsageRestriction");kt("2.5.29.5","policyMapping");kt("2.5.29.6","subtreesConstraint");kt("2.5.29.7","subjectAltName");kt("2.5.29.8","issuerAltName");kt("2.5.29.9","subjectDirectoryAttributes");kt("2.5.29.10","basicConstraints");kt("2.5.29.11","nameConstraints");kt("2.5.29.12","policyConstraints");kt("2.5.29.13","basicConstraints");fe("2.5.29.14","subjectKeyIdentifier");fe("2.5.29.15","keyUsage");kt("2.5.29.16","privateKeyUsagePeriod");fe("2.5.29.17","subjectAltName");fe("2.5.29.18","issuerAltName");fe("2.5.29.19","basicConstraints");kt("2.5.29.20","cRLNumber");kt("2.5.29.21","cRLReason");kt("2.5.29.22","expirationDate");kt("2.5.29.23","instructionCode");kt("2.5.29.24","invalidityDate");kt("2.5.29.25","cRLDistributionPoints");kt("2.5.29.26","issuingDistributionPoint");kt("2.5.29.27","deltaCRLIndicator");kt("2.5.29.28","issuingDistributionPoint");kt("2.5.29.29","certificateIssuer");kt("2.5.29.30","nameConstraints");fe("2.5.29.31","cRLDistributionPoints");fe("2.5.29.32","certificatePolicies");kt("2.5.29.33","policyMappings");kt("2.5.29.34","policyConstraints");fe("2.5.29.35","authorityKeyIdentifier");kt("2.5.29.36","policyConstraints");fe("2.5.29.37","extKeyUsage");kt("2.5.29.46","freshestCRL");kt("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 yn=i(function(sLe,GM){var Vt=Xe();_t();qi();var _e=GM.exports=Vt.asn1=Vt.asn1||{};_e.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};_e.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};_e.maxDepth=256;_e.create=function(o,f,h,y,x){if(Vt.util.isArray(y)){var z=[];for(var C=0;C<y.length;++C)if(y[C]!==void 0)z.push(y[C]);y=z}var w={tagClass:o,type:f,constructed:h,composed:h||Vt.util.isArray(y),value:y};if(x&&"bitStringContents"in x)w.bitStringContents=x.bitStringContents,w.original=_e.copy(w);return w};_e.copy=function(o,f){var h;if(Vt.util.isArray(o)){h=[];for(var y=0;y<o.length;++y)h.push(_e.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:_e.copy(o.value,f)},f&&!f.excludeBitStringContents)h.bitStringContents=o.bitStringContents;return h};_e.equals=function(o,f,h){if(Vt.util.isArray(o)){if(!Vt.util.isArray(f))return!1;if(o.length!==f.length)return!1;for(var y=0;y<o.length;++y)if(!_e.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&&_e.equals(o.value,f.value);if(h&&h.includeBitStringContents)x=x&&o.bitStringContents===f.bitStringContents;return x};_e.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 Hve=function(o,f){var h=o.getByte();if(f--,h===128)return;var y,x=h&128;if(!x)y=h;else{var z=h&127;Bu(o,f,z),y=o.getInt(z<<3)}if(y<0)throw Error("Negative length: "+y);return y};_e.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=_e.maxDepth;if(typeof o==="string")o=Vt.util.createBuffer(o);var h=o.length(),y=mh(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 mh(o,f,h,y){if(h>=y.maxDepth)throw Error("ASN.1 parsing error: Max depth exceeded.");var x;Bu(o,f,2);var z=o.getByte();f--;var C=z&192,w=z&31;x=o.length();var S=Hve(o,f);if(f-=x-o.length(),S!==void 0&&S>f){if(y.strict){var E=Error("Too few bytes to read ASN.1 value.");throw E.available=o.length(),E.remaining=f,E.requested=S,E}S=f}var T,k,O=(z&32)===32;if(O)if(T=[],S===void 0)for(;;){if(Bu(o,f,2),o.bytes(2)===String.fromCharCode(0,0)){o.getBytes(2),f-=2;break}x=o.length(),T.push(mh(o,f,h+1,y)),f-=x-o.length()}else while(S>0)x=o.length(),T.push(mh(o,S,h+1,y)),f-=x-o.length(),S-=x-o.length();if(T===void 0&&C===_e.Class.UNIVERSAL&&w===_e.Type.BITSTRING)k=o.bytes(S);if(T===void 0&&y.decodeBitStrings&&C===_e.Class.UNIVERSAL&&w===_e.Type.BITSTRING&&S>1){var R=o.read,I=f,A=0;if(w===_e.Type.BITSTRING)Bu(o,f,1),A=o.getByte(),f--;if(A===0)try{x=o.length();var j={strict:!0,decodeBitStrings:!1,maxDepth:y.maxDepth},P=mh(o,f,h+1,j),F=x-o.length();if(f-=F,w==_e.Type.BITSTRING)F++;var q=P.tagClass;if(F===S&&(q===_e.Class.UNIVERSAL||q===_e.Class.CONTEXT_SPECIFIC))T=[P]}catch(ee){}if(T===void 0)o.read=R,f=I}if(T===void 0){if(S===void 0){if(y.strict)throw Error("Non-constructed ASN.1 object of indefinite length.");S=f}if(w===_e.Type.BMPSTRING){T="";for(;S>0;S-=2)Bu(o,f,2),T+=String.fromCharCode(o.getInt16()),f-=2}else T=o.getBytes(S),f-=S}var W=k===void 0?null:{bitStringContents:k};return _e.create(C,w,O,T,W)}_e.toDer=function(o){var f=Vt.util.createBuffer(),h=o.tagClass|o.type,y=Vt.util.createBuffer(),x=!1;if("bitStringContents"in o){if(x=!0,o.original)x=_e.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 z=0;z<o.value.length;++z)if(o.value[z]!==void 0)y.putBuffer(_e.toDer(o.value[z]))}else if(o.type===_e.Type.BMPSTRING)for(var z=0;z<o.value.length;++z)y.putInt16(o.value.charCodeAt(z));else if(o.type===_e.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 C=y.length(),w="";do w+=String.fromCharCode(C&255),C=C>>>8;while(C>0);f.putByte(w.length|128);for(var z=w.length-1;z>=0;--z)f.putByte(w.charCodeAt(z))}return f.putBuffer(y),f};_e.oidToDer=function(o){var f=o.split("."),h=Vt.util.createBuffer(),y=parseInt(f[0],10),x=parseInt(f[1],10);if(!(y>=0&&y<=2&&x>=0)||y<2&&x>39)throw Error("Invalid OID; the first two arcs are out of range.");var z,C,w,S;for(var E=1;E<f.length;++E){if(z=!0,C=[],w=E===1?40*y+x:parseInt(f[E],10),w>4294967295)throw Error("OID value too large; max is 32-bits.");do{if(S=w&127,w=w>>>7,!z)S|=128;C.push(S),z=!1}while(w>0);for(var T=C.length-1;T>=0;--T)h.putByte(C[T])}return h};_e.derToOid=function(o){var f;if(typeof o==="string")o=Vt.util.createBuffer(o);var h,y=0,x=!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{if(y+=h,x)f=y<80?Math.floor(y/40)+"."+y%40:"2."+(y-80),x=!1;else f+="."+y;y=0}}return f};_e.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),z=parseInt(o.substr(6,2),10),C=parseInt(o.substr(8,2),10),w=0;if(o.length>11){var S=o.charAt(10),E=10;if(S!=="+"&&S!=="-")w=parseInt(o.substr(10,2),10),E+=2}if(f.setUTCFullYear(h,y,x),f.setUTCHours(z,C,w,0),E){if(S=o.charAt(E),S==="+"||S==="-"){var T=parseInt(o.substr(E+1,2),10),k=parseInt(o.substr(E+4,2),10),O=T*60+k;if(O*=60000,S==="+")f.setTime(+f-O);else f.setTime(+f+O)}}return f};_e.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),z=parseInt(o.substr(8,2),10),C=parseInt(o.substr(10,2),10),w=parseInt(o.substr(12,2),10),S=0,E=0,T=!1;if(o.charAt(o.length-1)==="Z")T=!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(E=R*60+I,E*=60000,O==="+")E*=-1;T=!0}if(o.charAt(14)===".")S=parseFloat(o.substr(14),10)*1000;if(T)f.setUTCFullYear(h,y,x),f.setUTCHours(z,C,w,S),f.setTime(+f+E);else f.setFullYear(h,y,x),f.setHours(z,C,w,S);return f};_e.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};_e.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};_e.integerToDer=function(o){var f=Vt.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};_e.derToInteger=function(o){if(typeof o==="string")o=Vt.util.createBuffer(o);var f=o.length()*8;if(f>32)throw Error("Integer too large; max is 32-bits.");return o.getSignedInt(f)};_e.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&&Vt.util.isArray(f.value)){var z=0;for(var C=0;x&&C<f.value.length;++C){var w=f.value[C];x=!!w.optional;var S=o.value[z];if(!S){if(!w.optional){if(x=!1,y)y.push("["+f.name+'] Missing required element. Expected tag class "'+w.tagClass+'", type "'+w.type+'"')}continue}var E=typeof w.tagClass<"u"&&typeof w.type<"u";if(E&&(S.tagClass!==w.tagClass||S.type!==w.type))if(w.optional){x=!0;continue}else{if(x=!1,y)y.push("["+f.name+"] Tag mismatch. Expected ("+w.tagClass+","+w.type+"), got ("+S.tagClass+","+S.type+")");break}var T=_e.validate(S,w,h,y);if(T)++z,x=!0;else if(w.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 HM=/[^\\u0000-\\u00ff]/;_e.prettyPrint=function(o,f,h){var y="";if(f=f||0,h=h||2,f>0)y+=`
114
+ `;var x="";for(var z=0;z<f*h;++z)x+=" ";switch(y+=x+"Tag: ",o.tagClass){case _e.Class.UNIVERSAL:y+="Universal:";break;case _e.Class.APPLICATION:y+="Application:";break;case _e.Class.CONTEXT_SPECIFIC:y+="Context-Specific:";break;case _e.Class.PRIVATE:y+="Private:";break}if(o.tagClass===_e.Class.UNIVERSAL)switch(y+=o.type,o.type){case _e.Type.NONE:y+=" (None)";break;case _e.Type.BOOLEAN:y+=" (Boolean)";break;case _e.Type.INTEGER:y+=" (Integer)";break;case _e.Type.BITSTRING:y+=" (Bit string)";break;case _e.Type.OCTETSTRING:y+=" (Octet string)";break;case _e.Type.NULL:y+=" (Null)";break;case _e.Type.OID:y+=" (Object Identifier)";break;case _e.Type.ODESC:y+=" (Object Descriptor)";break;case _e.Type.EXTERNAL:y+=" (External or Instance of)";break;case _e.Type.REAL:y+=" (Real)";break;case _e.Type.ENUMERATED:y+=" (Enumerated)";break;case _e.Type.EMBEDDED:y+=" (Embedded PDV)";break;case _e.Type.UTF8:y+=" (UTF8)";break;case _e.Type.ROID:y+=" (Relative Object Identifier)";break;case _e.Type.SEQUENCE:y+=" (Sequence)";break;case _e.Type.SET:y+=" (Set)";break;case _e.Type.PRINTABLESTRING:y+=" (Printable String)";break;case _e.Type.IA5String:y+=" (IA5String (ASCII))";break;case _e.Type.UTCTIME:y+=" (UTC time)";break;case _e.Type.GENERALIZEDTIME:y+=" (Generalized time)";break;case _e.Type.BMPSTRING:y+=" (BMP String)";break}else y+=o.type;if(y+=`
115
+ `,y+=x+"Constructed: "+o.constructed+`
116
+ `,o.composed){var C=0,w="";for(var z=0;z<o.value.length;++z)if(o.value[z]!==void 0){if(C+=1,w+=_e.prettyPrint(o.value[z],f+1,h),z+1<o.value.length)w+=","}y+=x+"Sub values: "+C+w}else{if(y+=x+"Value: ",o.type===_e.Type.OID){var S=_e.derToOid(o.value);if(y+=S,Vt.pki&&Vt.pki.oids){if(S in Vt.pki.oids)y+=" ("+Vt.pki.oids[S]+") "}}if(o.type===_e.Type.INTEGER)try{y+=_e.derToInteger(o.value)}catch(T){y+="0x"+Vt.util.bytesToHex(o.value)}else if(o.type===_e.Type.BITSTRING){if(o.value.length>1)y+="0x"+Vt.util.bytesToHex(o.value.slice(1));else y+="(none)";if(o.value.length>0){var E=o.value.charCodeAt(0);if(E==1)y+=" (1 unused bit shown)";else if(E>1)y+=" ("+E+" unused bits shown)"}}else if(o.type===_e.Type.OCTETSTRING){if(!HM.test(o.value))y+="("+o.value+") ";y+="0x"+Vt.util.bytesToHex(o.value)}else if(o.type===_e.Type.UTF8)try{y+=Vt.util.decodeUtf8(o.value)}catch(T){if(T.message==="URI malformed")y+="0x"+Vt.util.bytesToHex(o.value)+" (malformed UTF8)";else throw T}else if(o.type===_e.Type.PRINTABLESTRING||o.type===_e.Type.IA5String)y+=o.value;else if(HM.test(o.value))y+="0x"+Vt.util.bytesToHex(o.value);else if(o.value.length===0)y+="[null]";else y+=o.value}return y}});var Dn=i(function(aLe,KM){var gh=Xe();KM.exports=gh.md=gh.md||{};gh.md.algorithms=gh.md.algorithms||{}});var dc=i(function(cLe,WM){var si=Xe();Dn();_t();var Gve=WM.exports=si.hmac=si.hmac||{};Gve.create=function(){var o=null,f=null,h=null,y=null,x={};return x.start=function(z,C){if(z!==null)if(typeof z==="string")if(z=z.toLowerCase(),z in si.md.algorithms)f=si.md.algorithms[z].create();else throw Error('Unknown hash algorithm "'+z+'"');else f=z;if(C===null)C=o;else{if(typeof C==="string")C=si.util.createBuffer(C);else if(si.util.isArray(C)){var w=C;C=si.util.createBuffer();for(var S=0;S<w.length;++S)C.putByte(w[S])}var E=C.length();if(E>f.blockLength)f.start(),f.update(C.bytes()),C=f.digest();h=si.util.createBuffer(),y=si.util.createBuffer(),E=C.length();for(var S=0;S<E;++S){var w=C.at(S);h.putByte(54^w),y.putByte(92^w)}if(E<f.blockLength){var w=f.blockLength-E;for(var S=0;S<w;++S)h.putByte(54),y.putByte(92)}o=C,h=h.bytes(),y=y.bytes()}f.start(),f.update(h)},x.update=function(z){f.update(z)},x.getMac=function(){var z=f.digest().bytes();return f.start(),f.update(y),f.update(z),f.digest()},x.digest=x.getMac,x}});var bh=i(function(lLe,XM){var Bn=Xe();Dn();_t();var ZM=XM.exports=Bn.md5=Bn.md5||{};Bn.md.md5=Bn.md.algorithms.md5=ZM;ZM.create=function(){if(!YM)Kve();var o=null,f=Bn.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 z=0;z<x;++z)y.fullMessageLength.push(0);return f=Bn.util.createBuffer(),o={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},y},y.start(),y.update=function(x,z){if(z==="utf8")x=Bn.util.encodeUtf8(x);var C=x.length;y.messageLength+=C,C=[C/4294967296>>>0,C>>>0];for(var w=y.fullMessageLength.length-1;w>=0;--w)y.fullMessageLength[w]+=C[1],C[1]=C[0]+(y.fullMessageLength[w]/4294967296>>>0),y.fullMessageLength[w]=y.fullMessageLength[w]>>>0,C[0]=C[1]/4294967296>>>0;if(f.putBytes(x),JM(o,h,f),f.read>2048||f.length()===0)f.compact();return y},y.digest=function(){var x=Bn.util.createBuffer();x.putBytes(f.bytes());var z=y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize,C=z&y.blockLength-1;x.putBytes(jx.substr(0,y.blockLength-C));var w,S=0;for(var E=y.fullMessageLength.length-1;E>=0;--E)w=y.fullMessageLength[E]*8+S,S=w/4294967296>>>0,x.putInt32Le(w>>>0);var T={h0:o.h0,h1:o.h1,h2:o.h2,h3:o.h3};JM(T,h,x);var k=Bn.util.createBuffer();return k.putInt32Le(T.h0),k.putInt32Le(T.h1),k.putInt32Le(T.h2),k.putInt32Le(T.h3),k},y};var jx=null,yh=null,Lu=null,pc=null,YM=!1;function Kve(){jx=String.fromCharCode(128),jx+=Bn.util.fillString(String.fromCharCode(0),64),yh=[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],Lu=[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],pc=Array(64);for(var o=0;o<64;++o)pc[o]=Math.floor(Math.abs(Math.sin(o+1))*4294967296);YM=!0}function JM(o,f,h){var y,x,z,C,w,S,E,T,k=h.length();while(k>=64){x=o.h0,z=o.h1,C=o.h2,w=o.h3;for(T=0;T<16;++T)f[T]=h.getInt32Le(),S=w^z&(C^w),y=x+S+pc[T]+f[T],E=Lu[T],x=w,w=C,C=z,z+=y<<E|y>>>32-E;for(;T<32;++T)S=C^w&(z^C),y=x+S+pc[T]+f[yh[T]],E=Lu[T],x=w,w=C,C=z,z+=y<<E|y>>>32-E;for(;T<48;++T)S=z^C^w,y=x+S+pc[T]+f[yh[T]],E=Lu[T],x=w,w=C,C=z,z+=y<<E|y>>>32-E;for(;T<64;++T)S=C^(z|~w),y=x+S+pc[T]+f[yh[T]],E=Lu[T],x=w,w=C,C=z,z+=y<<E|y>>>32-E;o.h0=o.h0+x|0,o.h1=o.h1+z|0,o.h2=o.h2+C|0,o.h3=o.h3+w|0,k-=64}}});var $s=i(function(uLe,e5){var xh=Xe();_t();var QM=e5.exports=xh.pem=xh.pem||{};QM.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+=vh(y);if(o.contentDomain)y={name:"Content-Domain",values:[o.contentDomain]},h+=vh(y);if(o.dekInfo){if(y={name:"DEK-Info",values:[o.dekInfo.algorithm]},o.dekInfo.parameters)y.values.push(o.dekInfo.parameters);h+=vh(y)}if(o.headers)for(var x=0;x<o.headers.length;++x)h+=vh(o.headers[x]);if(o.procType)h+=`\r
118
+ `;return h+=xh.util.encode64(o.body,f.maxline||64)+`\r
119
+ `,h+="-----END "+o.type+`-----\r
120
+ `,h};QM.decode=function(o){var f=[];o=String(o);var h=Zve(o),y=/(?:^|[^\x21-\x7e])([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,x=/\r?\n/,z;while(!0){if(z=h.next(),!z)break;var C=z[1];if(C==="NEW CERTIFICATE REQUEST")C="CERTIFICATE REQUEST";var w={type:C,procType:null,contentDomain:null,dekInfo:null,headers:[],body:xh.util.decode64(z[3])};if(f.push(w),!z[2])continue;var S=z[2].split(x),E=0;while(z&&E<S.length){var T=Jve(S[E]);for(var k=E+1;k<S.length;++k){var O=S[k];if(!/\s/.test(O[0]))break;T+=O,E=k}if(z=T.match(y),z){var R={name:z[1],values:[]},I=z[2].split(",");for(var A=0;A<I.length;++A)R.values.push(Wve(I[A]));if(!w.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.');w.procType={version:I[0],type:I[1]}}else if(!w.contentDomain&&R.name==="Content-Domain")w.contentDomain=I[0]||"";else if(!w.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.');w.dekInfo={algorithm:I[0],parameters:I[1]||null}}else w.headers.push(R)}++E}if(w.procType==="ENCRYPTED"&&!w.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 vh(o){var f=o.name+": ",h=[],y=function(S,E){return" "+E};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 z=0,C=-1;for(var x=0;x<f.length;++x,++z)if(z>65&&C!==-1){var w=f[C];if(w===",")++C,f=f.substr(0,C)+`\r
122
+ `+f.substr(C);else f=f.substr(0,C)+`\r
123
+ `+w+f.substr(C+1);z=x-C-1,C=-1,++x}else if(f[x]===" "||f[x]==="\t"||f[x]===",")C=x;return f}function Wve(o){return o.replace(/^\s+/,"")}function Jve(o){var f=o.length;while(f>0&&/\s/.test(o.charAt(f-1)))--f;return o.substring(0,f)}function Zve(o){var f=/[:A-Za-z0-9+\/=\s]/,h=/[^:A-Za-z0-9+\/=\s]/g,y=/[^\x21-\x7e\s]/g,x=/[A-Z0-9- ]/;function z(P,F){P.lastIndex=F;var q=P.exec(o);return q?q.index:o.length}function C(P){for(var F=P;F<o.length&&x.test(o.charAt(F));++F)if(F>P&&o.substr(F,5)==="-----")return o.substring(P,F);return null}function w(P){if(o.charAt(P)==="\r")++P;if(o.charAt(P)!==`
124
+ `)return-1;if(o.charAt(++P)==="\r")++P;return o.charAt(P)===`
125
+ `?P+1:-1}function S(P,F){for(var q=P;q<F;++q){var W=w(q);if(W!==-1&&W<F)return q}return-1}var E={};for(var T=o.indexOf("-----END ");T!==-1;T=o.indexOf("-----END ",T+1)){var k=C(T+9),O=T;while(O>0&&f.test(o.charAt(O-1)))--O;var R=S(O,T);if(k!==null&&R!==-1){var I="$"+k;(E[I]=E[I]||[]).push({end:T,blank:R})}}var A=0,j=-1;return{next:function(){var P;while((P=o.indexOf("-----BEGIN ",A))!==-1){A=P+1;var F=C(P+11);if(F===null)continue;var q=P+16+F.length,W=z(h,q),ee=o.substr(W,9)==="-----END "&&C(W+9)===F;if(q>j)j=z(y,q);var te=null,le=E["$"+F];if(le){var he=0,ye=le.length;while(he<ye){var ke=he+ye>>1;if(le[ke].end>W)ye=ke;else he=ke+1}te=le[he]||null}var me=[];if(o.charAt(q)==="\r"){if(o.charAt(q+1)===`
126
+ `)me.push(q+2);me.push(q+1)}else if(o.charAt(q)===`
127
+ `)me.push(q+1);me.push(q);for(var Ae=0;Ae<me.length;++Ae){var He=me[Ae],Le=ee?S(He+1,W):-1,Pe=W;if(Le===-1&&te)Le=te.blank,Pe=te.end;if(Le!==-1&&Le<=j){var re=w(Le);return A=Pe+14+F.length,[o.substring(P,A),F,o.substring(He,re),o.substring(re,Pe)]}if(ee&&He<W)return A=W+14+F.length,[o.substring(P,A),F,void 0,o.substring(He,W)]}}return null}}}});var Nu=i(function(dLe,r5){var Jt=Xe();dh();Px();_t();r5.exports=Jt.des=Jt.des||{};Jt.des.startEncrypting=function(o,f,h,y){var x=_h({key:o,output:h,decrypt:!1,mode:y||(f===null?"ECB":"CBC")});return x.start(f),x};Jt.des.createEncryptionCipher=function(o,f){return _h({key:o,output:null,decrypt:!1,mode:f})};Jt.des.startDecrypting=function(o,f,h,y){var x=_h({key:o,output:h,decrypt:!0,mode:y||(f===null?"ECB":"CBC")});return x.start(f),x};Jt.des.createDecryptionCipher=function(o,f){return _h({key:o,output:null,decrypt:!0,mode:f})};Jt.des.Algorithm=function(o,f){var h=this;h.name=o,h.mode=new f({blockSize:8,cipher:{encrypt:function(y,x){return t5(h._keys,y,x,!1)},decrypt:function(y,x){return t5(h._keys,y,x,!0)}}}),h._init=!1};Jt.des.Algorithm.prototype.initialize=function(o){if(this._init)return;var f=Jt.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=ixe(f),this._init=!0};Ln("DES-ECB",Jt.cipher.modes.ecb);Ln("DES-CBC",Jt.cipher.modes.cbc);Ln("DES-CFB",Jt.cipher.modes.cfb);Ln("DES-OFB",Jt.cipher.modes.ofb);Ln("DES-CTR",Jt.cipher.modes.ctr);Ln("3DES-ECB",Jt.cipher.modes.ecb);Ln("3DES-CBC",Jt.cipher.modes.cbc);Ln("3DES-CFB",Jt.cipher.modes.cfb);Ln("3DES-OFB",Jt.cipher.modes.ofb);Ln("3DES-CTR",Jt.cipher.modes.ctr);function Ln(o,f){var h=function(){return new Jt.des.Algorithm(o,f)};Jt.cipher.registerAlgorithm(o,h)}var Yve=[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],Xve=[-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],exe=[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],txe=[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],rxe=[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],oxe=[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],nxe=[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 ixe(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],z=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],C=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],w=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],S=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],E=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],T=[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,j=[],P=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],F=0,q;for(var W=0;W<A;W++){var ee=o.getInt32(),te=o.getInt32();q=(ee>>>4^te)&252645135,te^=q,ee^=q<<4,q=(te>>>-16^ee)&65535,ee^=q,te^=q<<-16,q=(ee>>>2^te)&858993459,te^=q,ee^=q<<2,q=(te>>>-16^ee)&65535,ee^=q,te^=q<<-16,q=(ee>>>1^te)&1431655765,te^=q,ee^=q<<1,q=(te>>>8^ee)&16711935,ee^=q,te^=q<<8,q=(ee>>>1^te)&1431655765,te^=q,ee^=q<<1,q=ee<<8|te>>>20&240,ee=te<<24|te<<8&16711680|te>>>8&65280|te>>>24&240,te=q;for(var le=0;le<P.length;++le){if(P[le])ee=ee<<2|ee>>>26,te=te<<2|te>>>26;else ee=ee<<1|ee>>>27,te=te<<1|te>>>27;ee&=-15,te&=-15;var he=f[ee>>>28]|h[ee>>>24&15]|y[ee>>>20&15]|x[ee>>>16&15]|z[ee>>>12&15]|C[ee>>>8&15]|w[ee>>>4&15],ye=S[te>>>28]|E[te>>>24&15]|T[te>>>20&15]|k[te>>>16&15]|O[te>>>12&15]|R[te>>>8&15]|I[te>>>4&15];q=(ye>>>16^he)&65535,j[F++]=he^q,j[F++]=ye^q<<16}}return j}function t5(o,f,h,y){var x=o.length===32?3:9,z;if(x===3)z=y?[30,-2,-2]:[0,32,2];else z=y?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var C,w=f[0],S=f[1];C=(w>>>4^S)&252645135,S^=C,w^=C<<4,C=(w>>>16^S)&65535,S^=C,w^=C<<16,C=(S>>>2^w)&858993459,w^=C,S^=C<<2,C=(S>>>8^w)&16711935,w^=C,S^=C<<8,C=(w>>>1^S)&1431655765,S^=C,w^=C<<1,w=w<<1|w>>>31,S=S<<1|S>>>31;for(var E=0;E<x;E+=3){var T=z[E+1],k=z[E+2];for(var O=z[E];O!=T;O+=k){var R=S^o[O],I=(S>>>4|S<<28)^o[O+1];C=w,w=S,S=C^(Xve[R>>>24&63]|exe[R>>>16&63]|rxe[R>>>8&63]|nxe[R&63]|Yve[I>>>24&63]|Qve[I>>>16&63]|txe[I>>>8&63]|oxe[I&63])}C=w,w=S,S=C}w=w>>>1|w<<31,S=S>>>1|S<<31,C=(w>>>1^S)&1431655765,S^=C,w^=C<<1,C=(S>>>8^w)&16711935,w^=C,S^=C<<8,C=(S>>>2^w)&858993459,w^=C,S^=C<<2,C=(w>>>16^S)&65535,S^=C,w^=C<<16,C=(w>>>4^S)&252645135,S^=C,w^=C<<4,h[0]=w,h[1]=S}function _h(o){o=o||{};var f=(o.mode||"CBC").toUpperCase(),h="DES-"+f,y;if(o.decrypt)y=Jt.cipher.createDecipher(h,o.key);else y=Jt.cipher.createCipher(h,o.key);var x=y.start;return y.start=function(z,C){var w=null;if(C instanceof Jt.util.ByteBuffer)w=C,C={};C=C||{},C.output=w,C.iv=z,x.call(y,C)},y}});var Ch=i(function(pLe,o5){var to=Xe();dc();Dn();_t();var sxe=to.pkcs5=to.pkcs5||{},ai;if(to.util.isNodejs&&!to.options.usePureJavaScript)ai=c("crypto");o5.exports=to.pbkdf2=sxe.pbkdf2=function(o,f,h,y,x,z){if(typeof x==="function")z=x,x=null;if(to.util.isNodejs&&!to.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"),!z){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(q,W){if(q)return z(q);z(null,W.toString("binary"))});return ai.pbkdf2(o,f,h,y,x,function(q,W){if(q)return z(q);z(null,W.toString("binary"))})}if(typeof x>"u"||x===null)x="sha1";if(typeof x==="string"){if(!(x in to.md.algorithms))throw Error("Unknown hash algorithm: "+x);x=to.md[x].create()}var C=x.digestLength;if(y>4294967295*C){var w=Error("Derived key is too long.");if(z)return z(w);throw w}var S=Math.ceil(y/C),E=y-(S-1)*C,T=to.hmac.create();T.start(x,o);var k="",O,R,I;if(!z){for(var A=1;A<=S;++A){T.start(null,null),T.update(f),T.update(to.util.int32ToBytes(A)),O=I=T.digest().getBytes();for(var j=2;j<=h;++j)T.start(null,null),T.update(I),R=T.digest().getBytes(),O=to.util.xorBytes(O,R,C),I=R;k+=A<S?O:O.substr(0,E)}return k}var A=1,j;function P(){if(A>S)return z(null,k);T.start(null,null),T.update(f),T.update(to.util.int32ToBytes(A)),O=I=T.digest().getBytes(),j=2,F()}function F(){if(j<=h)return T.start(null,null),T.update(I),R=T.digest().getBytes(),O=to.util.xorBytes(O,R,C),I=R,++j,to.util.setImmediate(F);k+=A<S?O:O.substr(0,E),++A,P()}P()}});var qx=i(function(fLe,c5){var Nn=Xe();Dn();_t();var i5=c5.exports=Nn.sha256=Nn.sha256||{};Nn.md.sha256=Nn.md.algorithms.sha256=i5;i5.create=function(){if(!s5)axe();var o=null,f=Nn.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 z=0;z<x;++z)y.fullMessageLength.push(0);return f=Nn.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,z){if(z==="utf8")x=Nn.util.encodeUtf8(x);var C=x.length;y.messageLength+=C,C=[C/4294967296>>>0,C>>>0];for(var w=y.fullMessageLength.length-1;w>=0;--w)y.fullMessageLength[w]+=C[1],C[1]=C[0]+(y.fullMessageLength[w]/4294967296>>>0),y.fullMessageLength[w]=y.fullMessageLength[w]>>>0,C[0]=C[1]/4294967296>>>0;if(f.putBytes(x),n5(o,h,f),f.read>2048||f.length()===0)f.compact();return y},y.digest=function(){var x=Nn.util.createBuffer();x.putBytes(f.bytes());var z=y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize,C=z&y.blockLength-1;x.putBytes(Mx.substr(0,y.blockLength-C));var w,S,E=y.fullMessageLength[0]*8;for(var T=0;T<y.fullMessageLength.length-1;++T)w=y.fullMessageLength[T+1]*8,S=w/4294967296>>>0,E+=S,x.putInt32(E>>>0),E=w>>>0;x.putInt32(E);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};n5(k,h,x);var O=Nn.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 Mx=null,s5=!1,a5=null;function axe(){Mx=String.fromCharCode(128),Mx+=Nn.util.fillString(String.fromCharCode(0),64),a5=[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],s5=!0}function n5(o,f,h){var y,x,z,C,w,S,E,T,k,O,R,I,A,j,P,F=h.length();while(F>=64){for(E=0;E<16;++E)f[E]=h.getInt32();for(;E<64;++E)y=f[E-2],y=(y>>>17|y<<15)^(y>>>19|y<<13)^y>>>10,x=f[E-15],x=(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3,f[E]=y+f[E-7]+x+f[E-16]|0;T=o.h0,k=o.h1,O=o.h2,R=o.h3,I=o.h4,A=o.h5,j=o.h6,P=o.h7;for(E=0;E<64;++E)C=(I>>>6|I<<26)^(I>>>11|I<<21)^(I>>>25|I<<7),w=j^I&(A^j),z=(T>>>2|T<<30)^(T>>>13|T<<19)^(T>>>22|T<<10),S=T&k|O&(T^k),y=P+C+w+a5[E]+f[E],x=z+S,P=j,j=A,A=I,I=R+y>>>0,R=O,O=k,k=T,T=y+x>>>0;o.h0=o.h0+T|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+j|0,o.h7=o.h7+P|0,F-=64}}});var Fx=i(function(hLe,l5){var jn=Xe();_t();var wh=null;if(jn.util.isNodejs&&!jn.options.usePureJavaScript&&!process.versions["node-webkit"])wh=c("crypto");var cxe=l5.exports=jn.prng=jn.prng||{};cxe.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(E,T){if(!T)return f.generateSync(E);var k=f.plugin.cipher,O=f.plugin.increment,R=f.plugin.formatKey,I=f.plugin.formatSeed,A=jn.util.createBuffer();f.key=null,j();function j(P){if(P)return T(P);if(A.length()>=E)return T(null,A.getBytes(E));if(f.generated>1048575)f.key=null;if(f.key===null)return jn.util.nextTick(function(){z(j)});var F=k(f.key,f.seed);f.generated+=F.length,A.putBytes(F),f.key=R(k(f.key,O(f.seed))),f.seed=I(k(f.key,f.seed)),jn.util.setImmediate(j)}},f.generateSync=function(E){var T=f.plugin.cipher,k=f.plugin.increment,O=f.plugin.formatKey,R=f.plugin.formatSeed;f.key=null;var I=jn.util.createBuffer();while(I.length()<E){if(f.generated>1048575)f.key=null;if(f.key===null)C();var A=T(f.key,f.seed);f.generated+=A.length,I.putBytes(A),f.key=O(T(f.key,k(f.seed))),f.seed=R(T(f.key,f.seed))}return I.getBytes(E)};function z(E){if(f.pools[0].messageLength>=32)return w(),E();var T=32-f.pools[0].messageLength<<5;f.seedFile(T,function(k,O){if(k)return E(k);f.collect(O),w(),E()})}function C(){if(f.pools[0].messageLength>=32)return w();var E=32-f.pools[0].messageLength<<5;f.collect(f.seedFileSync(E)),w()}function w(){f.reseeds=f.reseeds===4294967295?0:f.reseeds+1;var E=f.plugin.md.create();E.update(f.keyBytes);var T=1;for(var k=0;k<32;++k){if(f.reseeds%T===0)E.update(f.pools[k].digest().getBytes()),f.pools[k].start();T=T<<1}f.keyBytes=E.digest().getBytes(),E.start(),E.update(f.keyBytes);var O=E.digest().getBytes();f.key=f.plugin.formatKey(f.keyBytes),f.seed=f.plugin.formatSeed(O),f.generated=0}function S(E){var T=null,k=jn.util.globalScope,O=k.crypto||k.msCrypto;if(O&&O.getRandomValues)T=function(ee){return O.getRandomValues(ee)};var R=jn.util.createBuffer();if(T)while(R.length()<E){var I=Math.max(1,Math.min(E-R.length(),65536)/4),A=new Uint32Array(Math.floor(I));try{T(A);for(var j=0;j<A.length;++j)R.putInt32(A[j])}catch(ee){if(!(typeof QuotaExceededError<"u"&&ee instanceof QuotaExceededError))throw ee}}if(R.length()<E){var P,F,q,W=Math.floor(Math.random()*65536);while(R.length()<E){F=16807*(W&65535),P=16807*(W>>16),F+=(P&32767)<<16,F+=P>>15,F=(F&2147483647)+(F>>31),W=F&4294967295;for(var j=0;j<3;++j)q=W>>>(j<<3),q^=Math.floor(Math.random()*256),R.putByte(q&255)}}return R.getBytes(E)}if(wh)f.seedFile=function(E,T){wh.randomBytes(E,function(k,O){if(k)return T(k);T(null,O.toString())})},f.seedFileSync=function(E){return wh.randomBytes(E).toString()};else f.seedFile=function(E,T){try{T(null,S(E))}catch(k){T(k)}},f.seedFileSync=S;return f.collect=function(E){var T=E.length;for(var k=0;k<T;++k)f.pools[f.pool].update(E.substr(k,1)),f.pool=f.pool===31?0:f.pool+1},f.collectInt=function(E,T){var k="";for(var O=0;O<T;O+=8)k+=String.fromCharCode(E>>O&255);f.collect(k)},f.registerWorker=function(E){if(E===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 T=function(k){var O=k.data;if(O.forge&&O.forge.prng)f.seedFile(O.forge.prng.needed,function(R,I){E.postMessage({forge:{prng:{err:R,bytes:I}}})})};E.addEventListener("message",T)}},f}});var Vo=i(function(mLe,Ux){var Er=Xe();Mi();qx();Fx();_t();(function(){if(Er.random&&Er.random.getBytes){Ux.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 z=x(),C=null,w=Er.util.globalScope,S=w.crypto||w.msCrypto;if(S&&S.getRandomValues)C=function(k){return S.getRandomValues(k)};if(Er.options.usePureJavaScript||!Er.util.isNodejs&&!C){if(typeof window>"u"||window.document===void 0);if(z.collectInt(+new Date,32),typeof navigator<"u"){var E="";for(var T in navigator)try{if(typeof navigator[T]=="string")E+=navigator[T]}catch(k){}z.collect(E),E=null}if(o)o().mousemove(function(k){z.collectInt(k.clientX,16),z.collectInt(k.clientY,16)}),o().keypress(function(k){z.collectInt(k.charCode,8)})}if(!Er.random)Er.random=z;else for(var T in z)Er.random[T]=z[T];Er.random.createInstance=x,Ux.exports=Er.random})(typeof jQuery<"u"?jQuery:null)})()});var Vx=i(function(gLe,p5){var vo=Xe();_t();var $x=[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],u5=[1,2,3,5],lxe=function(o,f){return o<<f&65535|(o&65535)>>16-f},uxe=function(o,f){return(o&65535)>>f|o<<16-f&65535};p5.exports=vo.rc2=vo.rc2||{};vo.rc2.expandKey=function(o,f){if(typeof o==="string")o=vo.util.createBuffer(o);f=f||128;var h=o,y=o.length(),x=f,z=Math.ceil(x/8),C=255>>(x&7),w;for(w=y;w<128;w++)h.putByte($x[h.at(w-1)+h.at(w-y)&255]);h.setAt(128-z,$x[h.at(128-z)&C]);for(w=127-z;w>=0;w--)h.setAt(w,$x[h.at(w+1)^h.at(w+z)]);return h};var d5=function(o,f,h){var y=!1,x=null,z=null,C=null,w,S,E,T,k=[];o=vo.rc2.expandKey(o,f);for(E=0;E<64;E++)k.push(o.getInt16Le());if(h)w=function(I){for(E=0;E<4;E++)I[E]+=k[T]+(I[(E+3)%4]&I[(E+2)%4])+(~I[(E+3)%4]&I[(E+1)%4]),I[E]=lxe(I[E],u5[E]),T++},S=function(I){for(E=0;E<4;E++)I[E]+=k[I[(E+3)%4]&63]};else w=function(I){for(E=3;E>=0;E--)I[E]=uxe(I[E],u5[E]),I[E]-=k[T]+(I[(E+3)%4]&I[(E+2)%4])+(~I[(E+3)%4]&I[(E+1)%4]),T--},S=function(I){for(E=3;E>=0;E--)I[E]-=k[I[(E+3)%4]&63]};var O=function(I){var A=[];for(E=0;E<4;E++){var j=x.getInt16Le();if(C!==null)if(h)j^=C.getInt16Le();else C.putInt16Le(j);A.push(j&65535)}T=h?0:63;for(var P=0;P<I.length;P++)for(var F=0;F<I[P][0];F++)I[P][1](A);for(E=0;E<4;E++){if(C!==null)if(h)C.putInt16Le(A[E]);else A[E]^=C.getInt16Le();z.putInt16Le(A[E])}},R=null;return R={start:function(I,A){if(I){if(typeof I==="string")I=vo.util.createBuffer(I)}y=!1,x=vo.util.createBuffer(),z=A||new vo.util.createBuffer,C=I,R.output=z},update:function(I){if(!y)x.putBuffer(I);while(x.length()>=8)O([[5,w],[1,S],[6,w],[1,S],[5,w]])},finish:function(I){var A=!0;if(h)if(I)A=I(8,x,!h);else{var j=x.length()===8?8:8-x.length();x.fillWithByte(j,j)}if(A)y=!0,R.update();if(!h){if(A=x.length()===0,A)if(I)A=I(8,z,!h);else{var P=z.length(),F=z.at(P-1);if(F>P)A=!1;else z.truncate(F)}}return A}},R};vo.rc2.startEncrypting=function(o,f,h){var y=vo.rc2.createEncryptionCipher(o,128);return y.start(f,h),y};vo.rc2.createEncryptionCipher=function(o,f){return d5(o,f,!0)};vo.rc2.startDecrypting=function(o,f,h){var y=vo.rc2.createDecryptionCipher(o,128);return y.start(f,h),y};vo.rc2.createDecryptionCipher=function(o,f){return d5(o,f,!1)}});var Mu=i(function(yLe,x5){var Hx=Xe();x5.exports=Hx.jsbn=Hx.jsbn||{};var ci,dxe=244837814094590,f5=(dxe&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)}Hx.jsbn.BigInteger=ue;function gt(){return new ue(null)}function pxe(o,f,h,y,x,z){while(--z>=0){var C=f*this.data[o++]+h.data[y]+x;x=Math.floor(C/67108864),h.data[y++]=C&67108863}return x}function fxe(o,f,h,y,x,z){var C=f&32767,w=f>>15;while(--z>=0){var S=this.data[o]&32767,E=this.data[o++]>>15,T=w*S+E*C;S=C*S+((T&32767)<<15)+h.data[y]+(x&1073741823),x=(S>>>30)+(T>>>15)+w*E+(x>>>30),h.data[y++]=S&1073741823}return x}function h5(o,f,h,y,x,z){var C=f&16383,w=f>>14;while(--z>=0){var S=this.data[o]&16383,E=this.data[o++]>>14,T=w*S+E*C;S=C*S+((T&16383)<<14)+h.data[y]+x,x=(S>>28)+(T>>14)+w*E,h.data[y++]=S&268435455}return x}if(typeof navigator>"u")ue.prototype.am=h5,ci=28;else if(f5&&navigator.appName=="Microsoft Internet Explorer")ue.prototype.am=fxe,ci=30;else if(f5&&navigator.appName!="Netscape")ue.prototype.am=pxe,ci=26;else ue.prototype.am=h5,ci=28;ue.prototype.DB=ci;ue.prototype.DM=(1<<ci)-1;ue.prototype.DV=1<<ci;var Gx=52;ue.prototype.FV=Math.pow(2,Gx);ue.prototype.F1=Gx-ci;ue.prototype.F2=2*ci-Gx;var hxe="0123456789abcdefghijklmnopqrstuvwxyz",Sh=[],fc,Ho;fc=48;for(Ho=0;Ho<=9;++Ho)Sh[fc++]=Ho;fc=97;for(Ho=10;Ho<36;++Ho)Sh[fc++]=Ho;fc=65;for(Ho=10;Ho<36;++Ho)Sh[fc++]=Ho;function m5(o){return hxe.charAt(o)}function g5(o,f){var h=Sh[o.charCodeAt(f)];return h==null?-1:h}function mxe(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 gxe(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=gt();return f.fromInt(o),f}function yxe(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,z=0;while(--y>=0){var C=h==8?o[y]&255:g5(o,y);if(C<0){if(o.charAt(y)=="-")x=!0;continue}if(x=!1,z==0)this.data[this.t++]=C;else if(z+h>this.DB)this.data[this.t-1]|=(C&(1<<this.DB-z)-1)<<z,this.data[this.t++]=C>>this.DB-z;else this.data[this.t-1]|=C<<z;if(z+=h,z>=this.DB)z-=this.DB}if(h==8&&(o[0]&128)!=0){if(this.s=-1,z>0)this.data[this.t-1]|=(1<<this.DB-z)-1<<z}if(this.clamp(),x)ue.ZERO.subTo(this,this)}function bxe(){var o=this.s&this.DM;while(this.t>0&&this.data[this.t-1]==o)--this.t}function vxe(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="",C=this.t,w=this.DB-C*this.DB%f;if(C-- >0){if(w<this.DB&&(y=this.data[C]>>w)>0)x=!0,z=m5(y);while(C>=0){if(w<f)y=(this.data[C]&(1<<w)-1)<<f-w,y|=this.data[--C]>>(w+=this.DB-f);else if(y=this.data[C]>>(w-=f)&h,w<=0)w+=this.DB,--C;if(y>0)x=!0;if(x)z+=m5(y)}}return x?z:"0"}function xxe(){var o=gt();return ue.ZERO.subTo(this,o),o}function _xe(){return this.s<0?this.negate():this}function zxe(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 Eh(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 Cxe(){if(this.t<=0)return 0;return this.DB*(this.t-1)+Eh(this.data[this.t-1]^this.s&this.DM)}function wxe(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 Sxe(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 Exe(o,f){var h=o%this.DB,y=this.DB-h,x=(1<<y)-1,z=Math.floor(o/this.DB),C=this.s<<h&this.DM,w;for(w=this.t-1;w>=0;--w)f.data[w+z+1]=this.data[w]>>y|C,C=(this.data[w]&x)<<h;for(w=z-1;w>=0;--w)f.data[w]=0;f.data[z]=C,f.t=this.t+z+1,f.s=this.s,f.clamp()}function Txe(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,z=(1<<y)-1;f.data[0]=this.data[h]>>y;for(var C=h+1;C<this.t;++C)f.data[C-h-1]|=(this.data[C]&z)<<x,f.data[C-h]=this.data[C]>>y;if(y>0)f.data[this.t-h-1]|=(this.s&z)<<x;f.t=this.t-h,f.clamp()}function kxe(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 Oxe(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 Ixe(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 Rxe(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=gt();var z=gt(),C=this.s,w=o.s,S=this.DB-Eh(y.data[y.t-1]);if(S>0)y.lShiftTo(S,z),x.lShiftTo(S,h);else y.copyTo(z),x.copyTo(h);var E=z.t,T=z.data[E-1];if(T==0)return;var k=T*(1<<this.F1)+(E>1?z.data[E-2]>>this.F2:0),O=this.FV/k,R=(1<<this.F1)/k,I=1<<this.F2,A=h.t,j=A-E,P=f==null?gt():f;if(z.dlShiftTo(j,P),h.compareTo(P)>=0)h.data[h.t++]=1,h.subTo(P,h);ue.ONE.dlShiftTo(E,P),P.subTo(z,z);while(z.t<E)z.data[z.t++]=0;while(--j>=0){var F=h.data[--A]==T?this.DM:Math.floor(h.data[A]*O+(h.data[A-1]+I)*R);if((h.data[A]+=z.am(0,F,h,j,0,E))<F){z.dlShiftTo(j,P),h.subTo(P,h);while(h.data[A]<--F)h.subTo(P,h)}}if(f!=null){if(h.drShiftTo(E,f),C!=w)ue.ZERO.subTo(f,f)}if(h.t=E,h.clamp(),S>0)h.rShiftTo(S,h);if(C<0)ue.ZERO.subTo(h,h)}function Axe(o){var f=gt();if(this.abs().divRemTo(o,null,f),this.s<0&&f.compareTo(ue.ZERO)>0)o.subTo(f,f);return f}function Vs(o){this.m=o}function Pxe(o){if(o.s<0||o.compareTo(this.m)>=0)return o.mod(this.m);else return o}function Dxe(o){return o}function Bxe(o){o.divRemTo(this.m,null,o)}function Lxe(o,f,h){o.multiplyTo(f,h),this.reduce(h)}function Nxe(o,f){o.squareTo(f),this.reduce(f)}Vs.prototype.convert=Pxe;Vs.prototype.revert=Dxe;Vs.prototype.reduce=Bxe;Vs.prototype.mulTo=Lxe;Vs.prototype.sqrTo=Nxe;function jxe(){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 Mxe(o){var f=gt();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 qxe(o){var f=gt();return o.copyTo(f),this.reduce(f),f}function Fxe(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 Uxe(o,f){o.squareTo(f),this.reduce(f)}function $xe(o,f,h){o.multiplyTo(f,h),this.reduce(h)}Gs.prototype.convert=Mxe;Gs.prototype.revert=qxe;Gs.prototype.reduce=Fxe;Gs.prototype.mulTo=$xe;Gs.prototype.sqrTo=Uxe;function Vxe(){return(this.t>0?this.data[0]&1:this.s)==0}function Hxe(o,f){if(o>4294967295||o<1)return ue.ONE;var h=gt(),y=gt(),x=f.convert(this),z=Eh(o)-1;x.copyTo(h);while(--z>=0)if(f.sqrTo(h,y),(o&1<<z)>0)f.mulTo(y,x,h);else{var C=h;h=y,y=C}return f.revert(h)}function Gxe(o,f){var h;if(o<256||f.isEven())h=new Vs(f);else h=new Gs(f);return this.exp(o,h)}ue.prototype.copyTo=mxe;ue.prototype.fromInt=gxe;ue.prototype.fromString=yxe;ue.prototype.clamp=bxe;ue.prototype.dlShiftTo=wxe;ue.prototype.drShiftTo=Sxe;ue.prototype.lShiftTo=Exe;ue.prototype.rShiftTo=Txe;ue.prototype.subTo=kxe;ue.prototype.multiplyTo=Oxe;ue.prototype.squareTo=Ixe;ue.prototype.divRemTo=Rxe;ue.prototype.invDigit=jxe;ue.prototype.isEven=Vxe;ue.prototype.exp=Hxe;ue.prototype.toString=vxe;ue.prototype.negate=xxe;ue.prototype.abs=_xe;ue.prototype.compareTo=zxe;ue.prototype.bitLength=Cxe;ue.prototype.mod=Axe;ue.prototype.modPowInt=Gxe;ue.ZERO=Fi(0);ue.ONE=Fi(1);function Kxe(){var o=gt();return this.copyTo(o),o}function Wxe(){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 Jxe(){return this.t==0?this.s:this.data[0]<<24>>24}function Zxe(){return this.t==0?this.s:this.data[0]<<16>>16}function Yxe(o){return Math.floor(Math.LN2*this.DB/Math.log(o))}function Xxe(){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=gt(),z=gt(),C="";this.divRemTo(y,x,z);while(x.signum()>0)C=(h+z.intValue()).toString(o).substr(1)+C,x.divRemTo(y,x,z);return z.intValue().toString(o)+C}function e_e(o,f){if(this.fromInt(0),f==null)f=10;var h=this.chunkSize(f),y=Math.pow(f,h),x=!1,z=0,C=0;for(var w=0;w<o.length;++w){var S=g5(o,w);if(S<0){if(o.charAt(w)=="-"&&this.signum()==0)x=!0;continue}if(C=f*C+S,++z>=h)this.dMultiply(y),this.dAddOffset(C,0),z=0,C=0}if(z>0)this.dMultiply(Math.pow(f,z)),this.dAddOffset(C,0);if(x)ue.ZERO.subTo(this,this)}function t_e(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),Kx,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 r_e(){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 o_e(o){return this.compareTo(o)==0}function n_e(o){return this.compareTo(o)<0?this:o}function i_e(o){return this.compareTo(o)>0?this:o}function s_e(o,f,h){var y,x,z=Math.min(o.t,this.t);for(y=0;y<z;++y)h.data[y]=f(this.data[y],o.data[y]);if(o.t<this.t){x=o.s&this.DM;for(y=z;y<this.t;++y)h.data[y]=f(this.data[y],x);h.t=this.t}else{x=this.s&this.DM;for(y=z;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 a_e(o,f){return o&f}function c_e(o){var f=gt();return this.bitwiseTo(o,a_e,f),f}function Kx(o,f){return o|f}function l_e(o){var f=gt();return this.bitwiseTo(o,Kx,f),f}function y5(o,f){return o^f}function u_e(o){var f=gt();return this.bitwiseTo(o,y5,f),f}function b5(o,f){return o&~f}function d_e(o){var f=gt();return this.bitwiseTo(o,b5,f),f}function p_e(){var o=gt();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 f_e(o){var f=gt();if(o<0)this.rShiftTo(-o,f);else this.lShiftTo(o,f);return f}function h_e(o){var f=gt();if(o<0)this.lShiftTo(-o,f);else this.rShiftTo(o,f);return f}function m_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 g_e(){for(var o=0;o<this.t;++o)if(this.data[o]!=0)return o*this.DB+m_e(this.data[o]);if(this.s<0)return this.t*this.DB;return-1}function y_e(o){var f=0;while(o!=0)o&=o-1,++f;return f}function b_e(){var o=0,f=this.s&this.DM;for(var h=0;h<this.t;++h)o+=y_e(this.data[h]^f);return o}function v_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 x_e(o,f){var h=ue.ONE.shiftLeft(o);return this.bitwiseTo(h,f,h),h}function __e(o){return this.changeBit(o,Kx)}function z_e(o){return this.changeBit(o,b5)}function C_e(o){return this.changeBit(o,y5)}function w_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 S_e(o){var f=gt();return this.addTo(o,f),f}function E_e(o){var f=gt();return this.subTo(o,f),f}function T_e(o){var f=gt();return this.multiplyTo(o,f),f}function k_e(){var o=gt();return this.squareTo(o),o}function O_e(o){var f=gt();return this.divRemTo(o,f,null),f}function I_e(o){var f=gt();return this.divRemTo(o,null,f),f}function R_e(o){var f=gt(),h=gt();return this.divRemTo(o,f,h),[f,h]}function A_e(o){this.data[this.t]=this.am(0,o-1,this,0,0,this.t),++this.t,this.clamp()}function P_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 ju(){}function v5(o){return o}function D_e(o,f,h){o.multiplyTo(f,h)}function B_e(o,f){o.squareTo(f)}ju.prototype.convert=v5;ju.prototype.revert=v5;ju.prototype.mulTo=D_e;ju.prototype.sqrTo=B_e;function L_e(o){return this.exp(o,new ju)}function N_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 j_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 hc(o){this.r2=gt(),this.q3=gt(),ue.ONE.dlShiftTo(2*o.t,this.r2),this.mu=this.r2.divide(o),this.m=o}function M_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=gt();return o.copyTo(f),this.reduce(f),f}}function q_e(o){return o}function F_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 U_e(o,f){o.squareTo(f),this.reduce(f)}function $_e(o,f,h){o.multiplyTo(f,h),this.reduce(h)}hc.prototype.convert=M_e;hc.prototype.revert=q_e;hc.prototype.reduce=F_e;hc.prototype.mulTo=$_e;hc.prototype.sqrTo=U_e;function V_e(o,f){var h=o.bitLength(),y,x=Fi(1),z;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)z=new Vs(f);else if(f.isEven())z=new hc(f);else z=new Gs(f);var C=[],w=3,S=y-1,E=(1<<y)-1;if(C[1]=z.convert(this),y>1){var T=gt();z.sqrTo(C[1],T);while(w<=E)C[w]=gt(),z.mulTo(T,C[w-2],C[w]),w+=2}var k=o.t-1,O,R=!0,I=gt(),A;h=Eh(o.data[k])-1;while(k>=0){if(h>=S)O=o.data[k]>>h-S&E;else if(O=(o.data[k]&(1<<h+1)-1)<<S-h,k>0)O|=o.data[k-1]>>this.DB+h-S;w=y;while((O&1)==0)O>>=1,--w;if((h-=w)<0)h+=this.DB,--k;if(R)C[O].copyTo(x),R=!1;else{while(w>1)z.sqrTo(x,I),z.sqrTo(I,x),w-=2;if(w>0)z.sqrTo(x,I);else A=x,x=I,I=A;z.mulTo(I,C[O],x)}while(k>=0&&(o.data[k]&1<<h)==0)if(z.sqrTo(x,I),A=x,x=I,I=A,--h<0)h=this.DB-1,--k}return z.revert(x)}function H_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(),z=h.getLowestSetBit();if(z<0)return f;if(x<z)z=x;if(z>0)f.rShiftTo(z,f),h.rShiftTo(z,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(z>0)h.lShiftTo(z,h);return h}function G_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 K_e(o){if(this.signum()<=0||o.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),z=Fi(0),C=Fi(0),w=Fi(1);while(h.signum()!=0){while(h.isEven()){if(h.rShiftTo(1,h),f){if(!x.isEven()||!z.isEven())x.addTo(this,x),z.subTo(o,z);x.rShiftTo(1,x)}else if(!z.isEven())z.subTo(o,z);z.rShiftTo(1,z)}while(y.isEven()){if(y.rShiftTo(1,y),f){if(!C.isEven()||!w.isEven())C.addTo(this,C),w.subTo(o,w);C.rShiftTo(1,C)}else if(!w.isEven())w.subTo(o,w);w.rShiftTo(1,w)}if(h.compareTo(y)>=0){if(h.subTo(y,h),f)x.subTo(C,x);z.subTo(w,z)}else{if(y.subTo(h,y),f)C.subTo(x,C);w.subTo(z,w)}}if(y.compareTo(ue.ONE)!=0)return ue.ZERO;if(w.compareTo(o)>=0)return w.subtract(o);if(w.signum()<0)w.addTo(o,w);else return w;if(w.signum()<0)return w.add(o);else return w}var bn=[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],W_e=67108864/bn[bn.length-1];function J_e(o){var f,h=this.abs();if(h.t==1&&h.data[0]<=bn[bn.length-1]){for(f=0;f<bn.length;++f)if(h.data[0]==bn[f])return!0;return!1}if(h.isEven())return!1;f=1;while(f<bn.length){var y=bn[f],x=f+1;while(x<bn.length&&y<W_e)y*=bn[x++];y=h.modInt(y);while(f<x)if(y%bn[f++]==0)return!1}return h.millerRabin(o)}function Z_e(o){var f=this.subtract(ue.ONE),h=f.getLowestSetBit();if(h<=0)return!1;var y=f.shiftRight(h),x=Y_e(),z;for(var C=0;C<o;++C){do z=new ue(this.bitLength(),x);while(z.compareTo(ue.ONE)<=0||z.compareTo(f)>=0);var w=z.modPow(y,this);if(w.compareTo(ue.ONE)!=0&&w.compareTo(f)!=0){var S=1;while(S++<h&&w.compareTo(f)!=0)if(w=w.modPowInt(2,this),w.compareTo(ue.ONE)==0)return!1;if(w.compareTo(f)!=0)return!1}}return!0}function Y_e(){return{nextBytes:function(o){for(var f=0;f<o.length;++f)o[f]=Math.floor(Math.random()*256)}}}ue.prototype.chunkSize=Yxe;ue.prototype.toRadix=Qxe;ue.prototype.fromRadix=e_e;ue.prototype.fromNumber=t_e;ue.prototype.bitwiseTo=s_e;ue.prototype.changeBit=x_e;ue.prototype.addTo=w_e;ue.prototype.dMultiply=A_e;ue.prototype.dAddOffset=P_e;ue.prototype.multiplyLowerTo=N_e;ue.prototype.multiplyUpperTo=j_e;ue.prototype.modInt=G_e;ue.prototype.millerRabin=Z_e;ue.prototype.clone=Kxe;ue.prototype.intValue=Wxe;ue.prototype.byteValue=Jxe;ue.prototype.shortValue=Zxe;ue.prototype.signum=Xxe;ue.prototype.toByteArray=r_e;ue.prototype.equals=o_e;ue.prototype.min=n_e;ue.prototype.max=i_e;ue.prototype.and=c_e;ue.prototype.or=l_e;ue.prototype.xor=u_e;ue.prototype.andNot=d_e;ue.prototype.not=p_e;ue.prototype.shiftLeft=f_e;ue.prototype.shiftRight=h_e;ue.prototype.getLowestSetBit=g_e;ue.prototype.bitCount=b_e;ue.prototype.testBit=v_e;ue.prototype.setBit=__e;ue.prototype.clearBit=z_e;ue.prototype.flipBit=C_e;ue.prototype.add=S_e;ue.prototype.subtract=E_e;ue.prototype.multiply=T_e;ue.prototype.divide=O_e;ue.prototype.remainder=I_e;ue.prototype.divideAndRemainder=R_e;ue.prototype.modPow=V_e;ue.prototype.modInverse=K_e;ue.prototype.pow=L_e;ue.prototype.gcd=H_e;ue.prototype.isProbablePrime=J_e;ue.prototype.square=k_e});var mc=i(function(bLe,w5){var Mn=Xe();Dn();_t();var z5=w5.exports=Mn.sha1=Mn.sha1||{};Mn.md.sha1=Mn.md.algorithms.sha1=z5;z5.create=function(){if(!C5)X_e();var o=null,f=Mn.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 z=0;z<x;++z)y.fullMessageLength.push(0);return f=Mn.util.createBuffer(),o={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},y},y.start(),y.update=function(x,z){if(z==="utf8")x=Mn.util.encodeUtf8(x);var C=x.length;y.messageLength+=C,C=[C/4294967296>>>0,C>>>0];for(var w=y.fullMessageLength.length-1;w>=0;--w)y.fullMessageLength[w]+=C[1],C[1]=C[0]+(y.fullMessageLength[w]/4294967296>>>0),y.fullMessageLength[w]=y.fullMessageLength[w]>>>0,C[0]=C[1]/4294967296>>>0;if(f.putBytes(x),_5(o,h,f),f.read>2048||f.length()===0)f.compact();return y},y.digest=function(){var x=Mn.util.createBuffer();x.putBytes(f.bytes());var z=y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize,C=z&y.blockLength-1;x.putBytes(Wx.substr(0,y.blockLength-C));var w,S,E=y.fullMessageLength[0]*8;for(var T=0;T<y.fullMessageLength.length-1;++T)w=y.fullMessageLength[T+1]*8,S=w/4294967296>>>0,E+=S,x.putInt32(E>>>0),E=w>>>0;x.putInt32(E);var k={h0:o.h0,h1:o.h1,h2:o.h2,h3:o.h3,h4:o.h4};_5(k,h,x);var O=Mn.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 Wx=null,C5=!1;function X_e(){Wx=String.fromCharCode(128),Wx+=Mn.util.fillString(String.fromCharCode(0),64),C5=!0}function _5(o,f,h){var y,x,z,C,w,S,E,T,k=h.length();while(k>=64){x=o.h0,z=o.h1,C=o.h2,w=o.h3,S=o.h4;for(T=0;T<16;++T)y=h.getInt32(),f[T]=y,E=w^z&(C^w),y=(x<<5|x>>>27)+E+S+1518500249+y,S=w,w=C,C=(z<<30|z>>>2)>>>0,z=x,x=y;for(;T<20;++T)y=f[T-3]^f[T-8]^f[T-14]^f[T-16],y=y<<1|y>>>31,f[T]=y,E=w^z&(C^w),y=(x<<5|x>>>27)+E+S+1518500249+y,S=w,w=C,C=(z<<30|z>>>2)>>>0,z=x,x=y;for(;T<32;++T)y=f[T-3]^f[T-8]^f[T-14]^f[T-16],y=y<<1|y>>>31,f[T]=y,E=z^C^w,y=(x<<5|x>>>27)+E+S+1859775393+y,S=w,w=C,C=(z<<30|z>>>2)>>>0,z=x,x=y;for(;T<40;++T)y=f[T-6]^f[T-16]^f[T-28]^f[T-32],y=y<<2|y>>>30,f[T]=y,E=z^C^w,y=(x<<5|x>>>27)+E+S+1859775393+y,S=w,w=C,C=(z<<30|z>>>2)>>>0,z=x,x=y;for(;T<60;++T)y=f[T-6]^f[T-16]^f[T-28]^f[T-32],y=y<<2|y>>>30,f[T]=y,E=z&C|w&(z^C),y=(x<<5|x>>>27)+E+S+2400959708+y,S=w,w=C,C=(z<<30|z>>>2)>>>0,z=x,x=y;for(;T<80;++T)y=f[T-6]^f[T-16]^f[T-28]^f[T-32],y=y<<2|y>>>30,f[T]=y,E=z^C^w,y=(x<<5|x>>>27)+E+S+3395469782+y,S=w,w=C,C=(z<<30|z>>>2)>>>0,z=x,x=y;o.h0=o.h0+x|0,o.h1=o.h1+z|0,o.h2=o.h2+C|0,o.h3=o.h3+w|0,o.h4=o.h4+S|0,k-=64}}});var Jx=i(function(vLe,E5){var qn=Xe();_t();Vo();mc();var S5=E5.exports=qn.pkcs1=qn.pkcs1||{};S5.encode_rsa_oaep=function(o,f,h){var y,x,z,C;if(typeof h==="string")y=h,x=arguments[3]||void 0,z=arguments[4]||void 0;else if(h){if(y=h.label||void 0,x=h.seed||void 0,z=h.md||void 0,h.mgf1&&h.mgf1.md)C=h.mgf1.md}if(!z)z=qn.md.sha1.create();else z.start();if(!C)C=z;var w=Math.ceil(o.n.bitLength()/8),S=w-2*z.digestLength-2;if(f.length>S){var E=Error("RSAES-OAEP input message length is too long.");throw E.length=f.length,E.maxLength=S,E}if(!y)y="";z.update(y,"raw");var T=z.digest(),k="",O=S-f.length;for(var R=0;R<O;R++)k+="\x00";var I=T.getBytes()+k+"\x01"+f;if(!x)x=qn.random.getBytes(z.digestLength);else if(x.length!==z.digestLength){var E=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw E.seedLength=x.length,E.digestLength=z.digestLength,E}var A=Th(x,w-z.digestLength-1,C),j=qn.util.xorBytes(I,A,I.length),P=Th(j,z.digestLength,C),F=qn.util.xorBytes(x,P,x.length);return"\x00"+F+j};S5.decode_rsa_oaep=function(o,f,h){var y,x,z;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)z=h.mgf1.md}var C=Math.ceil(o.n.bitLength()/8);if(f.length!==C){var j=Error("RSAES-OAEP encoded message length is invalid.");throw j.length=f.length,j.expectedLength=C,j}if(x===void 0)x=qn.md.sha1.create();else x.start();if(!z)z=x;if(C<2*x.digestLength+2)throw Error("RSAES-OAEP key is too short for the hash function.");if(!y)y="";x.update(y,"raw");var w=x.digest().getBytes(),S=f.charAt(0),E=f.substring(1,x.digestLength+1),T=f.substring(1+x.digestLength),k=Th(T,x.digestLength,z),O=qn.util.xorBytes(E,k,E.length),R=Th(O,C-x.digestLength-1,z),I=qn.util.xorBytes(T,R,T.length),A=I.substring(0,x.digestLength),j=S!=="\x00";for(var P=0;P<x.digestLength;++P)j|=w.charAt(P)!==A.charAt(P);var F=1,q=x.digestLength;for(var W=x.digestLength;W<I.length;W++){var ee=I.charCodeAt(W),te=ee&1^1,le=F?65534:0;j|=ee&le,F=F&te,q+=F}if(j||I.charCodeAt(q)!==1)throw Error("Invalid RSAES-OAEP padding.");return I.substring(q+1)};function Th(o,f,h){if(!h)h=qn.md.sha1.create();var y="",x=Math.ceil(f/h.digestLength);for(var z=0;z<x;++z){var C=String.fromCharCode(z>>24&255,z>>16&255,z>>8&255,z&255);h.start(),h.update(o+C),y+=h.digest().getBytes()}return y.substring(0,f)}});var Yx=i(function(xLe,Zx){var Ui=Xe();_t();Mu();Vo();(function(){if(Ui.prime){Zx.exports=Ui.prime;return}var o=Zx.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,j={nextBytes:function(P){var F=A.getBytesSync(P.length);for(var q=0;q<P.length;++q)P[q]=F.charCodeAt(q)}};if(I.name==="PRIMEINC")return z(k,j,I.options,R);throw Error("Invalid prime generation algorithm: "+I.name)};function z(k,O,R,I){if("workers"in R)return S(k,O,R,I);return C(k,O,R,I)}function C(k,O,R,I){var A=E(k,O),j=0,P=T(A.bitLength());if("millerRabinTests"in R)P=R.millerRabinTests;var F=10;if("maxBlockTime"in R)F=R.maxBlockTime;w(A,k,O,j,P,F,I)}function w(k,O,R,I,A,j,P){var F=+new Date;do{if(k.bitLength()>O)k=E(O,R);if(k.isProbablePrime(A))return P(null,k);k.dAddOffset(h[I++%8],0)}while(j<0||+new Date-F<j);Ui.util.setImmediate(function(){w(k,O,R,I,A,j,P)})}function S(k,O,R,I){if(typeof Worker>"u")return C(k,O,R,I);var A=E(k,O),j=R.workers,P=R.workLoad||100,F=P*30/8,q=R.workerScript||"forge/prime.worker.js";if(j===-1)return Ui.util.estimateCores(function(ee,te){if(ee)te=2;j=te-1,W()});W();function W(){j=Math.max(1,j);var ee=[];for(var te=0;te<j;++te)ee[te]=new Worker(q);var le=j;for(var te=0;te<j;++te)ee[te].addEventListener("message",ye);var he=!1;function ye(ke){if(he)return;--le;var me=ke.data;if(me.found){for(var Ae=0;Ae<ee.length;++Ae)ee[Ae].terminate();return he=!0,I(null,new f(me.prime,16))}if(A.bitLength()>k)A=E(k,O);var He=A.toString(16);ke.target.postMessage({hex:He,workLoad:P}),A.dAddOffset(F,0)}}}function E(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 T(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 qu=i(function(_Le,D5){var Me=Xe();yn();Mu();qi();Jx();Yx();Vo();_t();if(typeof ft>"u")ft=Me.jsbn.BigInteger;var ft,Xx=Me.util.isNodejs?c("crypto"):null,{asn1:Y,util:Go}=Me;Me.pki=Me.pki||{};D5.exports=Me.pki.rsa=Me.rsa=Me.rsa||{};var Ze=Me.pki,Q_e=[6,4,2,4,2,4,6,2],eze={name:"PrivateKeyInfo",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:Y.Class.UNIVERSAL,type:Y.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},tze={name:"RSAPrivateKey",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:Y.Class.UNIVERSAL,type:Y.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:Y.Class.UNIVERSAL,type:Y.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:Y.Class.UNIVERSAL,type:Y.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:Y.Class.UNIVERSAL,type:Y.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:Y.Class.UNIVERSAL,type:Y.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:Y.Class.UNIVERSAL,type:Y.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:Y.Class.UNIVERSAL,type:Y.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:Y.Class.UNIVERSAL,type:Y.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:Y.Class.UNIVERSAL,type:Y.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},rze={name:"RSAPublicKey",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:Y.Class.UNIVERSAL,type:Y.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:Y.Class.UNIVERSAL,type:Y.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},oze=Me.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:Y.Class.UNIVERSAL,type:Y.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},nze={name:"DigestInfo",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:Y.Class.UNIVERSAL,type:Y.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},T5=function(o,f,h){var y=[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(o).getBytes())];if(h)y.push(Y.create(Y.Class.UNIVERSAL,Y.Type.NULL,!1,""));return Y.toDer(Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,y),Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,f)])).getBytes()},ize=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=Y.oidToDer(f).getBytes(),x=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[]),z=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[]);z.value.push(Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,y)),z.value.push(Y.create(Y.Class.UNIVERSAL,Y.Type.NULL,!1,""));var C=Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,o.digest().getBytes());return x.value.push(z),x.value.push(C),Y.toDer(x).getBytes()},A5=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(Me.util.bytesToHex(Me.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),z=o.mod(f.q).modPow(f.dQ,f.q);while(x.compareTo(z)<0)x=x.add(f.p);var C=x.subtract(z).multiply(f.qInv).mod(f.p).multiply(f.q).add(z);return C=C.multiply(y.modInverse(f.n)).mod(f.n),C};Ze.rsa.encrypt=function(o,f,h){var y=h,x,z=Math.ceil(f.n.bitLength()/8);if(h!==!1&&h!==!0)y=h===2,x=P5(o,f,h);else x=Me.util.createBuffer(),x.putBytes(o);var C=new ft(x.toHex(),16),w=A5(C,f,y),S=w.toString(16),E=Me.util.createBuffer(),T=z-Math.ceil(S.length/2);while(T>0)E.putByte(0),--T;return E.putBytes(Me.util.hexToBytes(S)),E.getBytes()};Ze.rsa.decrypt=function(o,f,h,y){var x=Math.ceil(f.n.bitLength()/8);if(o.length!==x){var z=Error("Encrypted message length is invalid.");throw z.length=o.length,z.expected=x,z}var C=new ft(Me.util.createBuffer(o).toHex(),16);if(C.compareTo(f.n)>=0)throw Error("Encrypted message is invalid.");var w=A5(C,f,h),S=w.toString(16),E=Me.util.createBuffer(),T=x-Math.ceil(S.length/2);while(T>0)E.putByte(0),--T;if(E.putBytes(Me.util.hexToBytes(S)),y!==!1)return kh(E.getBytes(),f,h);return E.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||Me.random,x={nextBytes:function(w){var S=y.getBytesSync(w.length);for(var E=0;E<w.length;++E)w[E]=S.charCodeAt(E)}},z=h.algorithm||"PRIMEINC",C;if(z==="PRIMEINC")C={algorithm:z,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},C.e.fromInt(C.eInt);else throw Error("Invalid key generation algorithm: "+z);return C};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},z=+new Date,C,w=0;while(o.keys===null&&(f<=0||w<f)){if(o.state===0){var S=o.p===null?o.pBits:o.qBits,E=S-1;if(o.pqState===0){if(o.num=new ft(S,o.rng),!o.num.testBit(E))o.num.bitwiseTo(ft.ONE.shiftLeft(E),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()>S)o.pqState=0;else if(o.num.isProbablePrime(aze(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 T=o.e.modInverse(o.phi);o.keys={privateKey:Ze.rsa.setPrivateKey(o.n,o.e,T,o.p,o.q,T.mod(o.p1),T.mod(o.q1),o.q.modInverse(o.p)),publicKey:Ze.rsa.setPublicKey(o.n,o.e)}}C=+new Date,w+=C-z,z=C}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(!Me.options.usePureJavaScript&&!h.prng&&o>=256&&o<=16384&&(f===65537||f===3)){if(y){if(k5("generateKeyPair"))return Xx.generateKeyPair("rsa",{modulusLength:o,publicExponent:f,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(w,S,E){if(w)return y(w);y(null,{privateKey:Ze.privateKeyFromPem(E),publicKey:Ze.publicKeyFromPem(S)})});if(O5("generateKey")&&O5("exportKey"))return Go.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:o,publicExponent:R5(f),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(w){return Go.globalScope.crypto.subtle.exportKey("pkcs8",w.privateKey)}).then(void 0,function(w){y(w)}).then(function(w){if(w){var S=Ze.privateKeyFromAsn1(Y.fromDer(Me.util.createBuffer(w)));y(null,{privateKey:S,publicKey:Ze.setRsaPublicKey(S.n,S.e)})}});if(I5("generateKey")&&I5("exportKey")){var x=Go.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:o,publicExponent:R5(f),hash:{name:"SHA-256"}},!0,["sign","verify"]);x.oncomplete=function(w){var S=w.target.result,E=Go.globalScope.msCrypto.subtle.exportKey("pkcs8",S.privateKey);E.oncomplete=function(T){var k=T.target.result,O=Ze.privateKeyFromAsn1(Y.fromDer(Me.util.createBuffer(k)));y(null,{privateKey:O,publicKey:Ze.setRsaPublicKey(O.n,O.e)})},E.onerror=function(T){y(T)}},x.onerror=function(w){y(w)};return}}else if(k5("generateKeyPairSync")){var z=Xx.generateKeyPairSync("rsa",{modulusLength:o,publicExponent:f,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:Ze.privateKeyFromPem(z.privateKey),publicKey:Ze.publicKeyFromPem(z.publicKey)}}}var C=Ze.rsa.createKeyPairGenerationState(o,f,h);if(!y)return Ze.rsa.stepKeyPairGenerationState(C,0),C.keys;sze(C,h,y)};Ze.setRsaPublicKey=Ze.rsa.setPublicKey=function(o,f){var h={n:o,e:f};return h.encrypt=function(y,x,z){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(w,S,E){return P5(w,S,2).getBytes()}};else if(x==="RSA-OAEP"||x==="RSAES-OAEP")x={encode:function(w,S){return Me.pkcs1.encode_rsa_oaep(S,w,z)}};else if(["RAW","NONE","NULL",null].indexOf(x)!==-1)x={encode:function(w){return w}};else if(typeof x==="string")throw Error('Unsupported encryption scheme: "'+x+'".');var C=x.encode(y,h,!0);return Ze.rsa.encrypt(C,h,!0)},h.verify=function(y,x,z,C){if(typeof z==="string")z=z.toUpperCase();else if(z===void 0)z="RSASSA-PKCS1-V1_5";if(C===void 0)C={_parseAllDigestBytes:!0,_skipPaddingChecks:!1};if(!("_parseAllDigestBytes"in C))C._parseAllDigestBytes=!0;if(!("_skipPaddingChecks"in C))C._skipPaddingChecks=!1;if(z==="RSASSA-PKCS1-V1_5")z={verify:function(S,E){E=kh(E,h,!0,void 0,C);var T=Y.fromDer(E,{parseAllBytes:C._parseAllDigestBytes}),k={},O=[];if(!Y.validate(T,nze,k,O)||T.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=Y.derToOid(k.algorithmIdentifier);if(!(I===Me.oids.md2||I===Me.oids.md5||I===Me.oids.sha1||I===Me.oids.sha224||I===Me.oids.sha256||I===Me.oids.sha384||I===Me.oids.sha512||I===Me.oids["sha512-224"]||I===Me.oids["sha512-256"])){var R=Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw R.oid=I,R}if(I===Me.oids.md2||I===Me.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.")}var A=T5(I,k.digest,!0),j=T5(I,k.digest,!1);if(E.substring(0,A.length)!==A&&E.substring(0,j.length)!==j)throw Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");return S===k.digest}};else if(z==="NONE"||z==="NULL"||z===null)z={verify:function(S,E){return E=kh(E,h,!0,void 0,C),S===E}};var w=Ze.rsa.decrypt(x,h,!0,!1);return z.verify(y,w,h.n.bitLength())},h};Ze.setRsaPrivateKey=Ze.rsa.setPrivateKey=function(o,f,h,y,x,z,C,w){var S={n:o,e:f,d:h,p:y,q:x,dP:z,dQ:C,qInv:w};return S.decrypt=function(E,T,k){if(typeof T==="string")T=T.toUpperCase();else if(T===void 0)T="RSAES-PKCS1-V1_5";var O=Ze.rsa.decrypt(E,S,!1,!1);if(T==="RSAES-PKCS1-V1_5")T={decode:kh};else if(T==="RSA-OAEP"||T==="RSAES-OAEP")T={decode:function(R,I){return Me.pkcs1.decode_rsa_oaep(I,R,k)}};else if(["RAW","NONE","NULL",null].indexOf(T)!==-1)T={decode:function(R){return R}};else throw Error('Unsupported encryption scheme: "'+T+'".');return T.decode(O,S,!1)},S.sign=function(E,T){var k=!1;if(typeof T==="string")T=T.toUpperCase();if(T===void 0||T==="RSASSA-PKCS1-V1_5")T={encode:ize},k=1;else if(T==="NONE"||T==="NULL"||T===null)T={encode:function(){return E}},k=1;var O=T.encode(E,S.n.bitLength());return Ze.rsa.encrypt(O,S,k)},S};Ze.wrapRsaPrivateKey=function(o){return Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.INTEGER,!1,Y.integerToDer(0).getBytes()),Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Ze.oids.rsaEncryption).getBytes()),Y.create(Y.Class.UNIVERSAL,Y.Type.NULL,!1,"")]),Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,Y.toDer(o).getBytes())])};Ze.privateKeyFromAsn1=function(o){var f={},h=[];if(Y.validate(o,eze,f,h))o=Y.fromDer(Me.util.createBuffer(f.privateKey));if(f={},h=[],!Y.validate(o,tze,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,T,k;return x=Me.util.createBuffer(f.privateKeyModulus).toHex(),z=Me.util.createBuffer(f.privateKeyPublicExponent).toHex(),C=Me.util.createBuffer(f.privateKeyPrivateExponent).toHex(),w=Me.util.createBuffer(f.privateKeyPrime1).toHex(),S=Me.util.createBuffer(f.privateKeyPrime2).toHex(),E=Me.util.createBuffer(f.privateKeyExponent1).toHex(),T=Me.util.createBuffer(f.privateKeyExponent2).toHex(),k=Me.util.createBuffer(f.privateKeyCoefficient).toHex(),Ze.setRsaPrivateKey(new ft(x,16),new ft(z,16),new ft(C,16),new ft(w,16),new ft(S,16),new ft(E,16),new ft(T,16),new ft(k,16))};Ze.privateKeyToAsn1=Ze.privateKeyToRSAPrivateKey=function(o){return Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.INTEGER,!1,Y.integerToDer(0).getBytes()),Y.create(Y.Class.UNIVERSAL,Y.Type.INTEGER,!1,Fn(o.n)),Y.create(Y.Class.UNIVERSAL,Y.Type.INTEGER,!1,Fn(o.e)),Y.create(Y.Class.UNIVERSAL,Y.Type.INTEGER,!1,Fn(o.d)),Y.create(Y.Class.UNIVERSAL,Y.Type.INTEGER,!1,Fn(o.p)),Y.create(Y.Class.UNIVERSAL,Y.Type.INTEGER,!1,Fn(o.q)),Y.create(Y.Class.UNIVERSAL,Y.Type.INTEGER,!1,Fn(o.dP)),Y.create(Y.Class.UNIVERSAL,Y.Type.INTEGER,!1,Fn(o.dQ)),Y.create(Y.Class.UNIVERSAL,Y.Type.INTEGER,!1,Fn(o.qInv))])};Ze.publicKeyFromAsn1=function(o){var f={},h=[];if(Y.validate(o,oze,f,h)){var y=Y.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=[],!Y.validate(o,rze,f,h)){var x=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw x.errors=h,x}var z=Me.util.createBuffer(f.publicKeyModulus).toHex(),C=Me.util.createBuffer(f.publicKeyExponent).toHex();return Ze.setRsaPublicKey(new ft(z,16),new ft(C,16))};Ze.publicKeyToAsn1=Ze.publicKeyToSubjectPublicKeyInfo=function(o){return Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Ze.oids.rsaEncryption).getBytes()),Y.create(Y.Class.UNIVERSAL,Y.Type.NULL,!1,"")]),Y.create(Y.Class.UNIVERSAL,Y.Type.BITSTRING,!1,[Ze.publicKeyToRSAPublicKey(o)])])};Ze.publicKeyToRSAPublicKey=function(o){return Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.INTEGER,!1,Fn(o.n)),Y.create(Y.Class.UNIVERSAL,Y.Type.INTEGER,!1,Fn(o.e))])};function P5(o,f,h){var y=Me.util.createBuffer(),x=Math.ceil(f.n.bitLength()/8);if(o.length>x-11){var z=Error("Message is too long for PKCS#1 v1.5 padding.");throw z.length=o.length,z.max=x-11,z}y.putByte(0),y.putByte(h);var C=x-3-o.length,w;if(h===0||h===1){w=h===0?0:255;for(var S=0;S<C;++S)y.putByte(w)}else while(C>0){var E=0,T=Me.random.getBytes(C);for(var S=0;S<C;++S)if(w=T.charCodeAt(S),w===0)++E;else y.putByte(w);C=E}return y.putByte(0),y.putBytes(o),y}function kh(o,f,h,y,x){var z=Math.ceil(f.n.bitLength()/8),C=Me.util.createBuffer(o),w=C.getByte(),S=C.getByte();if(w!==0||h&&S!==0&&S!==1||!h&&S!==2||h&&S===0&&typeof y>"u")throw Error("Encryption block is invalid.");var E=0;if(S===0){E=z-3-y;for(var T=0;T<E;++T)if(C.getByte()!==0)throw Error("Encryption block is invalid.")}else if(S===1){E=0;while(C.length()>1){if(C.getByte()!==255){--C.read;break}++E}if(E<8&&!(x?x._skipPaddingChecks:!1))throw Error("Encryption block is invalid.")}else if(S===2){E=0;while(C.length()>1){if(C.getByte()===0){--C.read;break}++E}if(E<8&&!(x?x._skipPaddingChecks:!1))throw Error("Encryption block is invalid.")}var k=C.getByte();if(k!==0||E!==z-3-C.length())throw Error("Encryption block is invalid.");return C.getBytes()}function sze(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(){z(o.pBits,function(w,S){if(w)return h(w);if(o.p=S,o.q!==null)return C(w,o.q);z(o.qBits,C)})}function z(w,S){Me.prime.generateProbablePrime(w,y,S)}function C(w,S){if(w)return h(w);if(o.q=S,o.p.compareTo(o.q)<0){var E=o.p;o.p=o.q,o.q=E}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,z(o.qBits,C);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,z(o.qBits,C);return}var T=o.e.modInverse(o.phi);o.keys={privateKey:Ze.rsa.setPrivateKey(o.n,o.e,T,o.p,o.q,T.mod(o.p1),T.mod(o.q1),o.q.modInverse(o.p)),publicKey:Ze.rsa.setPublicKey(o.n,o.e)},h(null,o.keys)}}function Fn(o){var f=o.toString(16);if(f[0]>="8")f="00"+f;var h=Me.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 aze(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 k5(o){return Me.util.isNodejs&&typeof Xx[o]==="function"}function O5(o){return typeof Go.globalScope<"u"&&typeof Go.globalScope.crypto==="object"&&typeof Go.globalScope.crypto.subtle==="object"&&typeof Go.globalScope.crypto.subtle[o]==="function"}function I5(o){return typeof Go.globalScope<"u"&&typeof Go.globalScope.msCrypto==="object"&&typeof Go.globalScope.msCrypto.subtle==="object"&&typeof Go.globalScope.msCrypto.subtle[o]==="function"}function R5(o){var f=Me.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 e_=i(function(zLe,j5){var Te=Xe();Mi();yn();Nu();Dn();qi();Ch();$s();Vo();Vx();qu();_t();if(typeof Qx>"u")Qx=Te.jsbn.BigInteger;var Qx,ae=Te.asn1,Ye=Te.pki=Te.pki||{};j5.exports=Ye.pbe=Te.pbe=Te.pbe||{};var Ks=Ye.oids,cze={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"}]},lze={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"}]}]},uze={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=Te.random.getBytesSync(h.saltSize),x=h.count,z=ae.integerToDer(x),C,w,S;if(h.algorithm.indexOf("aes")===0||h.algorithm==="des"){var E,T,k;switch(h.algorithm){case"aes128":C=16,E=16,T=Ks["aes128-CBC"],k=Te.aes.createEncryptionCipher;break;case"aes192":C=24,E=16,T=Ks["aes192-CBC"],k=Te.aes.createEncryptionCipher;break;case"aes256":C=32,E=16,T=Ks["aes256-CBC"],k=Te.aes.createEncryptionCipher;break;case"des":C=8,E=8,T=Ks.desCBC,k=Te.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=N5(R),A=Te.pkcs5.pbkdf2(f,y,x,C,I),j=Te.random.getBytesSync(E),P=k(A);P.start(j),P.update(ae.toDer(o)),P.finish(),S=P.output.getBytes();var F=dze(y,z,C,R);w=ae.create(ae.Class.UNIVERSAL,ae.Type.SEQUENCE,!0,[ae.create(ae.Class.UNIVERSAL,ae.Type.OID,!1,ae.oidToDer(Ks.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(Ks.pkcs5PBKDF2).getBytes()),F]),ae.create(ae.Class.UNIVERSAL,ae.Type.SEQUENCE,!0,[ae.create(ae.Class.UNIVERSAL,ae.Type.OID,!1,ae.oidToDer(T).getBytes()),ae.create(ae.Class.UNIVERSAL,ae.Type.OCTETSTRING,!1,j)])])])}else if(h.algorithm==="3des"){C=24;var q=new Te.util.ByteBuffer(y),A=Ye.pbe.generatePkcs12Key(f,q,1,x,C),j=Ye.pbe.generatePkcs12Key(f,q,2,x,C),P=Te.des.createEncryptionCipher(A);P.start(j),P.update(ae.toDer(o)),P.finish(),S=P.output.getBytes(),w=ae.create(ae.Class.UNIVERSAL,ae.Type.SEQUENCE,!0,[ae.create(ae.Class.UNIVERSAL,ae.Type.OID,!1,ae.oidToDer(Ks["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,z.getBytes())])])}else{var O=Error("Cannot encrypt private key. Unknown encryption algorithm.");throw O.algorithm=h.algorithm,O}var W=ae.create(ae.Class.UNIVERSAL,ae.Type.SEQUENCE,!0,[w,ae.create(ae.Class.UNIVERSAL,ae.Type.OCTETSTRING,!1,S)]);return W};Ye.decryptPrivateKeyInfo=function(o,f){var h=null,y={},x=[];if(!ae.validate(o,cze,y,x)){var z=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw z.errors=x,z}var C=ae.derToOid(y.encryptionOid),w=Ye.pbe.getCipher(C,y.encryptionParams,f),S=Te.util.createBuffer(y.encryptedData);if(w.update(S),w.finish())h=ae.fromDer(w.output);return h};Ye.encryptedPrivateKeyToPem=function(o,f){var h={type:"ENCRYPTED PRIVATE KEY",body:ae.toDer(o).getBytes()};return Te.pem.encode(h,{maxline:f})};Ye.encryptedPrivateKeyFromPem=function(o){var f=Te.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,w;switch(h.algorithm){case"aes128":x="AES-128-CBC",C=16,z=Te.random.getBytesSync(16),w=Te.aes.createEncryptionCipher;break;case"aes192":x="AES-192-CBC",C=24,z=Te.random.getBytesSync(16),w=Te.aes.createEncryptionCipher;break;case"aes256":x="AES-256-CBC",C=32,z=Te.random.getBytesSync(16),w=Te.aes.createEncryptionCipher;break;case"3des":x="DES-EDE3-CBC",C=24,z=Te.random.getBytesSync(8),w=Te.des.createEncryptionCipher;break;case"des":x="DES-CBC",C=8,z=Te.random.getBytesSync(8),w=Te.des.createEncryptionCipher;break;default:var S=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+h.algorithm+'".');throw S.algorithm=h.algorithm,S}var E=Te.pbe.opensslDeriveBytes(f,z.substr(0,8),C),T=w(E);T.start(z),T.update(ae.toDer(Ye.privateKeyToAsn1(o))),T.finish();var k={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:x,parameters:Te.util.bytesToHex(z).toUpperCase()},body:T.output.getBytes()};return Te.pem.encode(k)};Ye.decryptRsaPrivateKey=function(o,f){var h=null,y=Te.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,C;switch(y.dekInfo.algorithm){case"DES-CBC":z=8,C=Te.des.createDecryptionCipher;break;case"DES-EDE3-CBC":z=24,C=Te.des.createDecryptionCipher;break;case"AES-128-CBC":z=16,C=Te.aes.createDecryptionCipher;break;case"AES-192-CBC":z=24,C=Te.aes.createDecryptionCipher;break;case"AES-256-CBC":z=32,C=Te.aes.createDecryptionCipher;break;case"RC2-40-CBC":z=5,C=function(k){return Te.rc2.createDecryptionCipher(k,40)};break;case"RC2-64-CBC":z=8,C=function(k){return Te.rc2.createDecryptionCipher(k,64)};break;case"RC2-128-CBC":z=16,C=function(k){return Te.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 w=Te.util.hexToBytes(y.dekInfo.parameters),S=Te.pbe.opensslDeriveBytes(f,w.substr(0,8),z),E=C(S);if(E.start(w),E.update(Te.util.createBuffer(y.body)),E.finish())h=E.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,z){var C,w;if(!(y>=1))throw Error("PKCS#12 key derivation iteration count must be >= 1.");if(typeof z>"u"||z===null){if(!("sha1"in Te.md))throw Error('"sha1" hash algorithm unavailable.');z=Te.md.sha1.create()}var S=z.digestLength,E=z.blockLength,T=new Te.util.ByteBuffer,k=new Te.util.ByteBuffer;if(o!==null&&o!==void 0){for(w=0;w<o.length;w++)k.putInt16(o.charCodeAt(w));k.putInt16(0)}var O=k.length(),R=f.length(),I=new Te.util.ByteBuffer;I.fillWithByte(h,E);var A=E*Math.ceil(R/E),j=new Te.util.ByteBuffer;for(w=0;w<A;w++)j.putByte(f.at(w%R));var P=E*Math.ceil(O/E),F=new Te.util.ByteBuffer;for(w=0;w<P;w++)F.putByte(k.at(w%O));var q=j;q.putBuffer(F);var W=Math.ceil(x/S);for(var ee=1;ee<=W;ee++){var te=new Te.util.ByteBuffer;te.putBytes(I.bytes()),te.putBytes(q.bytes());for(var le=0;le<y;le++)z.start(),z.update(te.getBytes()),te=z.digest();var he=new Te.util.ByteBuffer;for(w=0;w<E;w++)he.putByte(te.at(w%S));var ye=Math.ceil(R/E)+Math.ceil(O/E),ke=new Te.util.ByteBuffer;for(C=0;C<ye;C++){var me=new Te.util.ByteBuffer(q.getBytes(E)),Ae=511;for(w=he.length()-1;w>=0;w--)Ae=Ae>>8,Ae+=he.at(w)+me.at(w),me.setAt(w,Ae&255);ke.putBuffer(me)}q=ke,T.putBuffer(te)}return T.truncate(T.length()-x),T};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,lze,y,x)){var z=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw z.errors=x,z}if(o=ae.derToOid(y.kdfOid),o!==Ye.oids.pkcs5PBKDF2){var z=Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw z.oid=o,z.supportedOids=["pkcs5PBKDF2"],z}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 z=Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw z.oid=o,z.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],z}var C=y.kdfSalt,w=Te.util.createBuffer(y.kdfIterationCount);w=w.getInt(w.length()<<3);var S,E;switch(Ye.oids[o]){case"aes128-CBC":S=16,E=Te.aes.createDecryptionCipher;break;case"aes192-CBC":S=24,E=Te.aes.createDecryptionCipher;break;case"aes256-CBC":S=32,E=Te.aes.createDecryptionCipher;break;case"des-EDE3-CBC":S=24,E=Te.des.createDecryptionCipher;break;case"desCBC":S=8,E=Te.des.createDecryptionCipher;break}var T=L5(y.prfOid),k=Te.pkcs5.pbkdf2(h,C,w,S,T),O=y.encIv,R=E(k);return R.start(O),R};Ye.pbe.getCipherForPKCS12PBE=function(o,f,h){var y={},x=[];if(!ae.validate(f,uze,y,x)){var z=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw z.errors=x,z}var C=Te.util.createBuffer(y.salt),w=Te.util.createBuffer(y.iterations);w=w.getInt(w.length()<<3);var S,E,T;switch(o){case Ye.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:S=24,E=8,T=Te.des.startDecrypting;break;case Ye.oids["pbewithSHAAnd40BitRC2-CBC"]:S=5,E=8,T=function(A,j){var P=Te.rc2.createDecryptionCipher(A,40);return P.start(j,null),P};break;default:var z=Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw z.oid=o,z}var k=L5(y.prfOid),O=Ye.pbe.generatePkcs12Key(h,C,1,w,S,k);k.start();var R=Ye.pbe.generatePkcs12Key(h,C,2,w,E,k);return T(O,R)};Ye.pbe.opensslDeriveBytes=function(o,f,h,y){if(typeof y>"u"||y===null){if(!("md5"in Te.md))throw Error('"md5" hash algorithm unavailable.');y=Te.md.md5.create()}if(f===null)f="";var x=[B5(y,o+f)];for(var z=16,C=1;z<h;++C,z+=16)x.push(B5(y,x[C-1]+o+f));return x.join("").substr(0,h)};function B5(o,f){return o.start().update(f).digest().getBytes()}function L5(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 N5(f)}function N5(o){var f=Te.md;switch(o){case"hmacWithSHA224":f=Te.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 dze(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,Te.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 t_=i(function(CLe,F5){var gc=Xe();yn();_t();var Ee=gc.asn1,bc=F5.exports=gc.pkcs7asn1=gc.pkcs7asn1||{};gc.pkcs7=gc.pkcs7||{};gc.pkcs7.asn1=bc;var M5={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"}]};bc.contentInfoValidator=M5;var q5={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"}]};bc.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(q5)};bc.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(q5)};var pze={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"}]};bc.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"},M5,{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:[pze]}]};bc.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 r_=i(function(wLe,U5){var Ws=Xe();_t();Ws.mgf=Ws.mgf||{};var fze=U5.exports=Ws.mgf.mgf1=Ws.mgf1=Ws.mgf1||{};fze.create=function(o){var f={generate:function(h,y){var x=new Ws.util.ByteBuffer,z=Math.ceil(y/o.digestLength);for(var C=0;C<z;C++){var w=new Ws.util.ByteBuffer;w.putInt32(C),o.start(),o.update(h+w.getBytes()),x.putBuffer(o.digest())}return x.truncate(x.length()-y),x.getBytes()}};return f}});var V5=i(function(SLe,$5){var Oh=Xe();r_();$5.exports=Oh.mgf=Oh.mgf||{};Oh.mgf.mgf1=Oh.mgf1});var Ih=i(function(ELe,H5){var ea=Xe();Vo();_t();var hze=H5.exports=ea.pss=ea.pss||{};hze.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 z;if("saltLength"in o)z=o.saltLength;else if(x!==null)z=x.length();else throw Error("Salt length not specified or specific salt not given.");if(x!==null&&x.length()!==z)throw Error("Given salt length does not match length of given salt.");var C=o.prng||ea.random,w={};return w.encode=function(S,E){var T,k=E-1,O=Math.ceil(k/8),R=S.digest().getBytes();if(O<y+z+2)throw Error("Message is too long to encrypt.");var I;if(x===null)I=C.getBytesSync(z);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 j=f.digest().getBytes(),P=new ea.util.ByteBuffer;P.fillWithByte(0,O-z-y-2),P.putByte(1),P.putBytes(I);var F=P.getBytes(),q=O-y-1,W=h.generate(j,q),ee="";for(T=0;T<q;T++)ee+=String.fromCharCode(F.charCodeAt(T)^W.charCodeAt(T));var te=65280>>8*O-k&255;return ee=String.fromCharCode(ee.charCodeAt(0)&~te)+ee.substr(1),ee+j+String.fromCharCode(188)},w.verify=function(S,E,T){var k,O=T-1,R=Math.ceil(O/8);if(E=E.substr(-R),R<y+z+2)throw Error("Inconsistent parameters to PSS signature verification.");if(E.charCodeAt(R-1)!==188)throw Error("Encoded message does not end in 0xBC.");var I=R-y-1,A=E.substr(0,I),j=E.substr(I,y),P=65280>>8*R-O&255;if((A.charCodeAt(0)&P)!==0)throw Error("Bits beyond keysize not zero as expected.");var F=h.generate(j,I),q="";for(k=0;k<I;k++)q+=String.fromCharCode(A.charCodeAt(k)^F.charCodeAt(k));q=String.fromCharCode(q.charCodeAt(0)&~P)+q.substr(1);var W=R-y-z-2;for(k=0;k<W;k++)if(q.charCodeAt(k)!==0)throw Error("Leftmost octets not zero as expected");if(q.charCodeAt(W)!==1)throw Error("Inconsistent PSS signature, 0x01 marker not found");var ee=q.substr(-z),te=new ea.util.ByteBuffer;te.fillWithByte(0,8),te.putBytes(S),te.putBytes(ee),f.start(),f.update(te.getBytes());var le=f.digest().getBytes();return j===le},w}});var Ph=i(function(TLe,Z5){var qe=Xe();Mi();yn();Nu();Dn();V5();qi();$s();Ih();qu();_t();var D=qe.asn1,ge=Z5.exports=qe.pki=qe.pki||{},yt=ge.oids,tr={};tr.CN=yt.commonName;tr.commonName="CN";tr.C=yt.countryName;tr.countryName="C";tr.L=yt.localityName;tr.localityName="L";tr.ST=yt.stateOrProvinceName;tr.stateOrProvinceName="ST";tr.O=yt.organizationName;tr.organizationName="O";tr.OU=yt.organizationalUnitName;tr.organizationalUnitName="OU";tr.E=yt.emailAddress;tr.emailAddress="E";var K5=qe.pki.rsa.publicKeyValidator,mze={name:"Certificate",tagClass:D.Class.UNIVERSAL,type:D.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:D.Class.UNIVERSAL,type:D.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:D.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:D.Class.UNIVERSAL,type:D.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:D.Class.UNIVERSAL,type:D.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:D.Class.UNIVERSAL,type:D.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:D.Class.UNIVERSAL,type:D.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:D.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:D.Class.UNIVERSAL,type:D.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:D.Class.UNIVERSAL,type:D.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:D.Class.UNIVERSAL,type:D.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:D.Class.UNIVERSAL,type:D.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:D.Class.UNIVERSAL,type:D.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:D.Class.UNIVERSAL,type:D.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:D.Class.UNIVERSAL,type:D.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},K5,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:D.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:D.Class.UNIVERSAL,type:D.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:D.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:D.Class.UNIVERSAL,type:D.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:D.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:D.Class.UNIVERSAL,type:D.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:D.Class.UNIVERSAL,type:D.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:D.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:D.Class.UNIVERSAL,type:D.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},gze={name:"rsapss",tagClass:D.Class.UNIVERSAL,type:D.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:D.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:D.Class.UNIVERSAL,type:D.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:D.Class.UNIVERSAL,type:D.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:D.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:D.Class.UNIVERSAL,type:D.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:D.Class.UNIVERSAL,type:D.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:D.Class.UNIVERSAL,type:D.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:D.Class.UNIVERSAL,type:D.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:D.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:D.Class.UNIVERSAL,type:D.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:D.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:D.Class.UNIVERSAL,type:D.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},yze={name:"CertificationRequestInfo",tagClass:D.Class.UNIVERSAL,type:D.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:D.Class.UNIVERSAL,type:D.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:D.Class.UNIVERSAL,type:D.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},K5,{name:"CertificationRequestInfo.attributes",tagClass:D.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:D.Class.UNIVERSAL,type:D.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:D.Class.UNIVERSAL,type:D.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:D.Class.UNIVERSAL,type:D.Type.SET,constructed:!0}]}]}]},bze={name:"CertificationRequest",tagClass:D.Class.UNIVERSAL,type:D.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[yze,{name:"CertificationRequest.signatureAlgorithm",tagClass:D.Class.UNIVERSAL,type:D.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:D.Class.UNIVERSAL,type:D.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:D.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:D.Class.UNIVERSAL,type:D.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};ge.RDNAttributesAsArray=function(o,f){var h=[],y,x,z;for(var C=0;C<o.value.length;++C){y=o.value[C];for(var w=0;w<y.value.length;++w){if(z={},x=y.value[w],z.type=D.derToOid(x.value[0].value),z.value=x.value[1].value,z.valueTagClass=x.value[1].type,z.type in yt){if(z.name=yt[z.type],z.name in tr)z.shortName=tr[z.name]}if(f)f.update(z.type),f.update(z.value);h.push(z)}}return h};ge.CRIAttributesAsArray=function(o){var f=[];for(var h=0;h<o.length;++h){var y=o[h],x=D.derToOid(y.value[0].value),z=y.value[1].value;for(var C=0;C<z.length;++C){var w={};if(w.type=x,w.value=z[C].value,w.valueTagClass=z[C].type,w.type in yt){if(w.name=yt[w.type],w.name in tr)w.shortName=tr[w.name]}if(w.type===yt.extensionRequest){w.extensions=[];for(var S=0;S<w.value.length;++S)w.extensions.push(ge.certificateExtensionFromAsn1(w.value[S]))}f.push(w)}}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 Rh=function(o,f,h){var y={};if(o!==yt["RSASSA-PSS"])return y;if(h)y={hash:{algorithmOid:yt.sha1},mgf:{algorithmOid:yt.mgf1,hash:{algorithmOid:yt.sha1}},saltLength:20};var x={},z=[];if(!D.validate(f,gze,x,z)){var C=Error("Cannot read RSASSA-PSS parameter block.");throw C.errors=z,C}if(x.hashOid!==void 0)y.hash=y.hash||{},y.hash.algorithmOid=D.derToOid(x.hashOid);if(x.maskGenOid!==void 0)y.mgf=y.mgf||{},y.mgf.algorithmOid=D.derToOid(x.maskGenOid),y.mgf.hash=y.mgf.hash||{},y.mgf.hash.algorithmOid=D.derToOid(x.maskGenHashOid);if(x.saltLength!==void 0)y.saltLength=x.saltLength.charCodeAt(0);return y},Ah=function(o){switch(yt[o.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return qe.md.sha1.create();case"md5WithRSAEncryption":return qe.md.md5.create();case"sha256WithRSAEncryption":return qe.md.sha256.create();case"sha384WithRSAEncryption":return qe.md.sha384.create();case"sha512WithRSAEncryption":return qe.md.sha512.create();case"RSASSA-PSS":return qe.md.sha256.create();default:var f=Error("Could not compute "+o.type+" digest. Unknown signature OID.");throw f.signatureOid=o.signatureOid,f}},W5=function(o){var f=o.certificate,h=o.publicKey||f.publicKey,y;switch(f.signatureOid){case yt.sha1WithRSAEncryption:case yt.sha1WithRSASignature:break;case yt["RSASSA-PSS"]:var x,z;if(x=yt[f.signatureParameters.mgf.hash.algorithmOid],x===void 0||qe.md[x]===void 0){var C=Error("Unsupported MGF hash function.");throw C.oid=f.signatureParameters.mgf.hash.algorithmOid,C.name=x,C}if(z=yt[f.signatureParameters.mgf.algorithmOid],z===void 0||qe.mgf[z]===void 0){var C=Error("Unsupported MGF function.");throw C.oid=f.signatureParameters.mgf.algorithmOid,C.name=z,C}if(z=qe.mgf[z].create(qe.md[x].create()),x=yt[f.signatureParameters.hash.algorithmOid],x===void 0||qe.md[x]===void 0){var C=Error("Unsupported RSASSA-PSS hash function.");throw C.oid=f.signatureParameters.hash.algorithmOid,C.name=x,C}y=qe.pss.create(qe.md[x].create(),z,f.signatureParameters.saltLength);break}return h.verify(o.md.digest().getBytes(),o.signature,y)};ge.certificateFromPem=function(o,f,h){var y=qe.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 z=D.fromDer(y.body,h);return ge.certificateFromAsn1(z,f)};ge.certificateToPem=function(o,f){var h={type:"CERTIFICATE",body:D.toDer(ge.certificateToAsn1(o)).getBytes()};return qe.pem.encode(h,{maxline:f})};ge.publicKeyFromPem=function(o){var f=qe.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=D.fromDer(f.body);return ge.publicKeyFromAsn1(y)};ge.publicKeyToPem=function(o,f){var h={type:"PUBLIC KEY",body:D.toDer(ge.publicKeyToAsn1(o)).getBytes()};return qe.pem.encode(h,{maxline:f})};ge.publicKeyToRSAPublicKeyPem=function(o,f){var h={type:"RSA PUBLIC KEY",body:D.toDer(ge.publicKeyToRSAPublicKey(o)).getBytes()};return qe.pem.encode(h,{maxline:f})};ge.getPublicKeyFingerprint=function(o,f){f=f||{};var h=f.md||qe.md.sha1.create(),y=f.type||"RSAPublicKey",x;switch(y){case"RSAPublicKey":x=D.toDer(ge.publicKeyToRSAPublicKey(o)).getBytes();break;case"SubjectPublicKeyInfo":x=D.toDer(ge.publicKeyToAsn1(o)).getBytes();break;default:throw Error('Unknown fingerprint type "'+f.type+'".')}h.start(),h.update(x);var z=h.digest();if(f.encoding==="hex"){var C=z.toHex();if(f.delimiter)return C.match(/.{2}/g).join(f.delimiter);return C}else if(f.encoding==="binary")return z.getBytes();else if(f.encoding)throw Error('Unknown encoding "'+f.encoding+'".');return z};ge.certificationRequestFromPem=function(o,f,h){var y=qe.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 z=D.fromDer(y.body,h);return ge.certificationRequestFromAsn1(z,f)};ge.certificationRequestToPem=function(o,f){var h={type:"CERTIFICATE REQUEST",body:D.toDer(ge.certificationRequestToAsn1(o)).getBytes()};return qe.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){Ko([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){Ko([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(Ko(f),o.subject.attributes=f,delete o.subject.uniqueId,h)o.subject.uniqueId=h;o.subject.hash=null},o.setIssuer=function(f,h){if(Ko(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)J5(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||qe.md.sha1.create();var y=yt[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 z=D.toDer(o.tbsCertificate);o.md.update(z.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,z=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw z.expectedIssuer=x.attributes,z.actualIssuer=y.attributes,z}var C=f.md;if(C===null){C=Ah({signatureOid:f.signatureOid,type:"certificate"});var w=f.tbsCertificate||ge.getTBSCertificate(f),S=D.toDer(w);C.update(S.getBytes())}if(C!==null)h=W5({certificate:f,publicKey:o.publicKey,md:C,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,C;for(var w=0;h&&w<y.attributes.length;++w)if(z=y.attributes[w],C=x.attributes[w],z.type!==C.type||z.value!==C.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=yt.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 qe.util.hexToBytes(y.subjectKeyIdentifier)===x}}return!1},o};ge.certificateFromAsn1=function(o,f){var h={},y=[];if(!D.validate(o,mze,h,y)){var x=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw x.errors=y,x}var z=D.derToOid(h.publicKeyOid);if(z!==ge.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var C=ge.createCertificate();C.version=h.certVersion?h.certVersion.charCodeAt(0):0;var w=qe.util.createBuffer(h.certSerialNumber);C.serialNumber=w.toHex(),C.signatureOid=qe.asn1.derToOid(h.certSignatureOid),C.signatureParameters=Rh(C.signatureOid,h.certSignatureParams,!0),C.siginfo.algorithmOid=qe.asn1.derToOid(h.certinfoSignatureOid),C.siginfo.parameters=Rh(C.siginfo.algorithmOid,h.certinfoSignatureParams,!1),C.signature=h.certSignature;var S=[];if(h.certValidity1UTCTime!==void 0)S.push(D.utcTimeToDate(h.certValidity1UTCTime));if(h.certValidity2GeneralizedTime!==void 0)S.push(D.generalizedTimeToDate(h.certValidity2GeneralizedTime));if(h.certValidity3UTCTime!==void 0)S.push(D.utcTimeToDate(h.certValidity3UTCTime));if(h.certValidity4GeneralizedTime!==void 0)S.push(D.generalizedTimeToDate(h.certValidity4GeneralizedTime));if(S.length>2)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(S.length<2)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(C.validity.notBefore=S[0],C.validity.notAfter=S[1],C.tbsCertificate=h.tbsCertificate,f){C.md=Ah({signatureOid:C.signatureOid,type:"certificate"});var E=D.toDer(C.tbsCertificate);C.md.update(E.getBytes())}var T=qe.md.sha1.create(),k=D.toDer(h.certIssuer);if(T.update(k.getBytes()),C.issuer.getField=function(I){return $i(C.issuer,I)},C.issuer.addField=function(I){Ko([I]),C.issuer.attributes.push(I)},C.issuer.attributes=ge.RDNAttributesAsArray(h.certIssuer),h.certIssuerUniqueId)C.issuer.uniqueId=h.certIssuerUniqueId;C.issuer.hash=T.digest().toHex();var O=qe.md.sha1.create(),R=D.toDer(h.certSubject);if(O.update(R.getBytes()),C.subject.getField=function(I){return $i(C.subject,I)},C.subject.addField=function(I){Ko([I]),C.subject.attributes.push(I)},C.subject.attributes=ge.RDNAttributesAsArray(h.certSubject),h.certSubjectUniqueId)C.subject.uniqueId=h.certSubjectUniqueId;if(C.subject.hash=O.digest().toHex(),h.certExtensions)C.extensions=ge.certificateExtensionsFromAsn1(h.certExtensions);else C.extensions=[];return C.publicKey=ge.publicKeyFromAsn1(h.subjectPublicKeyInfo),C};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=D.derToOid(o.value[0].value),f.critical=!1,o.value[1].type===D.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 yt){if(f.name=yt[f.id],f.name==="keyUsage"){var h=D.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=D.fromDer(f.value);if(h.value.length>0&&h.value[0].type===D.Type.BOOLEAN)f.cA=h.value[0].value.charCodeAt(0)!==0;else f.cA=!1;var z=null;if(h.value.length>0&&h.value[0].type===D.Type.INTEGER)z=h.value[0].value;else if(h.value.length>1)z=h.value[1].value;if(z!==null)f.pathLenConstraint=D.derToInteger(z)}else if(f.name==="extKeyUsage"){var h=D.fromDer(f.value);for(var C=0;C<h.value.length;++C){var w=D.derToOid(h.value[C].value);if(w in yt)f[yt[w]]=!0;else f[w]=!0}}else if(f.name==="nsCertType"){var h=D.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 S,h=D.fromDer(f.value);for(var E=0;E<h.value.length;++E){S=h.value[E];var T={type:S.type,value:S.value};switch(f.altNames.push(T),S.type){case 1:case 2:case 6:break;case 7:T.ip=qe.util.bytesToIP(S.value);break;case 8:T.oid=D.derToOid(S.value);break;default:}}}else if(f.name==="subjectKeyIdentifier"){var h=D.fromDer(f.value);f.subjectKeyIdentifier=qe.util.bytesToHex(h.value)}}return f};ge.certificationRequestFromAsn1=function(o,f){var h={},y=[];if(!D.validate(o,bze,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 z=D.derToOid(h.publicKeyOid);if(z!==ge.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var C=ge.createCertificationRequest();if(C.version=h.csrVersion?h.csrVersion.charCodeAt(0):0,C.signatureOid=qe.asn1.derToOid(h.csrSignatureOid),C.signatureParameters=Rh(C.signatureOid,h.csrSignatureParams,!0),C.siginfo.algorithmOid=qe.asn1.derToOid(h.csrSignatureOid),C.siginfo.parameters=Rh(C.siginfo.algorithmOid,h.csrSignatureParams,!1),C.signature=h.csrSignature,C.certificationRequestInfo=h.certificationRequestInfo,f){C.md=Ah({signatureOid:C.signatureOid,type:"certification request"});var w=D.toDer(C.certificationRequestInfo);C.md.update(w.getBytes())}var S=qe.md.sha1.create();return C.subject.getField=function(E){return $i(C.subject,E)},C.subject.addField=function(E){Ko([E]),C.subject.attributes.push(E)},C.subject.attributes=ge.RDNAttributesAsArray(h.certificationRequestInfoSubject,S),C.subject.hash=S.digest().toHex(),C.publicKey=ge.publicKeyFromAsn1(h.subjectPublicKeyInfo),C.getAttribute=function(E){return $i(C,E)},C.addAttribute=function(E){Ko([E]),C.attributes.push(E)},C.attributes=ge.CRIAttributesAsArray(h.certificationRequestInfoAttributes||[]),C};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){Ko([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){Ko([f]),o.attributes.push(f)},o.md=null,o.setSubject=function(f){Ko(f),o.subject.attributes=f,o.subject.hash=null},o.setAttributes=function(f){Ko(f),o.attributes=f},o.sign=function(f,h){o.md=h||qe.md.sha1.create();var y=yt[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 z=D.toDer(o.certificationRequestInfo);o.md.update(z.getBytes()),o.signature=f.sign(o.md)},o.verify=function(){var f=!1,h=o.md;if(h===null){h=Ah({signatureOid:o.signatureOid,type:"certification request"});var y=o.certificationRequestInfo||ge.getCertificationRequestInfo(o),x=D.toDer(y);h.update(x.getBytes())}if(h!==null)f=W5({certificate:o,md:h,signature:o.signature});return f},o};function vc(o){var f=D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[]),h,y,x=o.attributes;for(var z=0;z<x.length;++z){h=x[z];var C=h.value,w=D.Type.PRINTABLESTRING;if("valueTagClass"in h){if(w=h.valueTagClass,w===D.Type.UTF8)C=qe.util.encodeUtf8(C)}y=D.create(D.Class.UNIVERSAL,D.Type.SET,!0,[D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[D.create(D.Class.UNIVERSAL,D.Type.OID,!1,D.oidToDer(h.type).getBytes()),D.create(D.Class.UNIVERSAL,w,!1,C)])]),f.value.push(y)}return f}function Ko(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 tr)f.name=ge.oids[tr[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 tr)f.shortName=tr[f.name]}if(f.type===yt.extensionRequest){if(f.valueConstructed=!0,f.valueTagClass=D.Type.SEQUENCE,!f.value&&f.extensions){f.value=[];for(var x=0;x<f.extensions.length;++x)f.value.push(ge.certificateExtensionToAsn1(J5(f.extensions[x])))}}if(typeof f.value>"u"){var y=Error("Attribute value not specified.");throw y.attribute=f,y}}}function J5(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,z=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)z|=128,y=7;var C=String.fromCharCode(y);if(z!==0)C+=String.fromCharCode(x)+String.fromCharCode(z);else if(x!==0)C+=String.fromCharCode(x);o.value=D.create(D.Class.UNIVERSAL,D.Type.BITSTRING,!1,C)}else if(o.name==="basicConstraints"){if(o.value=D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[]),o.cA)o.value.value.push(D.create(D.Class.UNIVERSAL,D.Type.BOOLEAN,!1,String.fromCharCode(255)));if("pathLenConstraint"in o)o.value.value.push(D.create(D.Class.UNIVERSAL,D.Type.INTEGER,!1,D.integerToDer(o.pathLenConstraint).getBytes()))}else if(o.name==="extKeyUsage"){o.value=D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[]);var w=o.value.value;for(var S in o){if(o[S]!==!0)continue;if(S in yt)w.push(D.create(D.Class.UNIVERSAL,D.Type.OID,!1,D.oidToDer(yt[S]).getBytes()));else if(S.indexOf(".")!==-1)w.push(D.create(D.Class.UNIVERSAL,D.Type.OID,!1,D.oidToDer(S).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 C=String.fromCharCode(y);if(x!==0)C+=String.fromCharCode(x);o.value=D.create(D.Class.UNIVERSAL,D.Type.BITSTRING,!1,C)}else if(o.name==="subjectAltName"||o.name==="issuerAltName"){o.value=D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[]);var E;for(var T=0;T<o.altNames.length;++T){E=o.altNames[T];var C=E.value;if(E.type===7&&E.ip){if(C=qe.util.bytesFromIP(E.ip),C===null){var h=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw h.extension=o,h}}else if(E.type===8)if(E.oid)C=D.oidToDer(D.oidToDer(E.oid));else C=D.oidToDer(C);o.value.value.push(D.create(D.Class.CONTEXT_SPECIFIC,E.type,!1,C))}}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=D.create(D.Class.UNIVERSAL,D.Type.IA5STRING,!1,o.comment)}else if(o.name==="subjectKeyIdentifier"&&f.cert){var k=f.cert.generateSubjectKeyIdentifier();o.subjectKeyIdentifier=k.toHex(),o.value=D.create(D.Class.UNIVERSAL,D.Type.OCTETSTRING,!1,k.getBytes())}else if(o.name==="authorityKeyIdentifier"&&f.cert){o.value=D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[]);var w=o.value.value;if(o.keyIdentifier){var O=o.keyIdentifier===!0?f.cert.generateSubjectKeyIdentifier().getBytes():o.keyIdentifier;w.push(D.create(D.Class.CONTEXT_SPECIFIC,0,!1,O))}if(o.authorityCertIssuer){var R=[D.create(D.Class.CONTEXT_SPECIFIC,4,!0,[vc(o.authorityCertIssuer===!0?f.cert.issuer:o.authorityCertIssuer)])];w.push(D.create(D.Class.CONTEXT_SPECIFIC,1,!0,R))}if(o.serialNumber){var I=qe.util.hexToBytes(o.serialNumber===!0?f.cert.serialNumber:o.serialNumber);w.push(D.create(D.Class.CONTEXT_SPECIFIC,2,!1,I))}}else if(o.name==="cRLDistributionPoints"){o.value=D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[]);var w=o.value.value,A=D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[]),j=D.create(D.Class.CONTEXT_SPECIFIC,0,!0,[]),E;for(var T=0;T<o.altNames.length;++T){E=o.altNames[T];var C=E.value;if(E.type===7&&E.ip){if(C=qe.util.bytesFromIP(E.ip),C===null){var h=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw h.extension=o,h}}else if(E.type===8)if(E.oid)C=D.oidToDer(D.oidToDer(E.oid));else C=D.oidToDer(C);j.value.push(D.create(D.Class.CONTEXT_SPECIFIC,E.type,!1,C))}A.value.push(D.create(D.Class.CONTEXT_SPECIFIC,0,!0,[j])),w.push(A)}if(typeof o.value>"u"){var h=Error("Extension value not specified.");throw h.extension=o,h}return o}function o_(o,f){switch(o){case yt["RSASSA-PSS"]:var h=[];if(f.hash.algorithmOid!==void 0)h.push(D.create(D.Class.CONTEXT_SPECIFIC,0,!0,[D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[D.create(D.Class.UNIVERSAL,D.Type.OID,!1,D.oidToDer(f.hash.algorithmOid).getBytes()),D.create(D.Class.UNIVERSAL,D.Type.NULL,!1,"")])]));if(f.mgf.algorithmOid!==void 0)h.push(D.create(D.Class.CONTEXT_SPECIFIC,1,!0,[D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[D.create(D.Class.UNIVERSAL,D.Type.OID,!1,D.oidToDer(f.mgf.algorithmOid).getBytes()),D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[D.create(D.Class.UNIVERSAL,D.Type.OID,!1,D.oidToDer(f.mgf.hash.algorithmOid).getBytes()),D.create(D.Class.UNIVERSAL,D.Type.NULL,!1,"")])])]));if(f.saltLength!==void 0)h.push(D.create(D.Class.CONTEXT_SPECIFIC,2,!0,[D.create(D.Class.UNIVERSAL,D.Type.INTEGER,!1,D.integerToDer(f.saltLength).getBytes())]));return D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,h);default:return D.create(D.Class.UNIVERSAL,D.Type.NULL,!1,"")}}function vze(o){var f=D.create(D.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],z=x.value,C=D.Type.UTF8;if("valueTagClass"in x)C=x.valueTagClass;if(C===D.Type.UTF8)z=qe.util.encodeUtf8(z);var w=!1;if("valueConstructed"in x)w=x.valueConstructed;var S=D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[D.create(D.Class.UNIVERSAL,D.Type.OID,!1,D.oidToDer(x.type).getBytes()),D.create(D.Class.UNIVERSAL,D.Type.SET,!0,[D.create(D.Class.UNIVERSAL,C,w,z)])]);f.value.push(S)}return f}var xze=new Date("1950-01-01T00:00:00Z"),_ze=new Date("2050-01-01T00:00:00Z");function G5(o){if(o>=xze&&o<_ze)return D.create(D.Class.UNIVERSAL,D.Type.UTCTIME,!1,D.dateToUtcTime(o));else return D.create(D.Class.UNIVERSAL,D.Type.GENERALIZEDTIME,!1,D.dateToGeneralizedTime(o))}ge.getTBSCertificate=function(o){var f=G5(o.validity.notBefore),h=G5(o.validity.notAfter),y=D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[D.create(D.Class.CONTEXT_SPECIFIC,0,!0,[D.create(D.Class.UNIVERSAL,D.Type.INTEGER,!1,D.integerToDer(o.version).getBytes())]),D.create(D.Class.UNIVERSAL,D.Type.INTEGER,!1,qe.util.hexToBytes(o.serialNumber)),D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[D.create(D.Class.UNIVERSAL,D.Type.OID,!1,D.oidToDer(o.siginfo.algorithmOid).getBytes()),o_(o.siginfo.algorithmOid,o.siginfo.parameters)]),vc(o.issuer),D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[f,h]),vc(o.subject),ge.publicKeyToAsn1(o.publicKey)]);if(o.issuer.uniqueId)y.value.push(D.create(D.Class.CONTEXT_SPECIFIC,1,!0,[D.create(D.Class.UNIVERSAL,D.Type.BITSTRING,!1,String.fromCharCode(0)+o.issuer.uniqueId)]));if(o.subject.uniqueId)y.value.push(D.create(D.Class.CONTEXT_SPECIFIC,2,!0,[D.create(D.Class.UNIVERSAL,D.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=D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[D.create(D.Class.UNIVERSAL,D.Type.INTEGER,!1,D.integerToDer(o.version).getBytes()),vc(o.subject),ge.publicKeyToAsn1(o.publicKey),vze(o)]);return f};ge.distinguishedNameToAsn1=function(o){return vc(o)};ge.certificateToAsn1=function(o){var f=o.tbsCertificate||ge.getTBSCertificate(o);return D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[f,D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[D.create(D.Class.UNIVERSAL,D.Type.OID,!1,D.oidToDer(o.signatureOid).getBytes()),o_(o.signatureOid,o.signatureParameters)]),D.create(D.Class.UNIVERSAL,D.Type.BITSTRING,!1,String.fromCharCode(0)+o.signature)])};ge.certificateExtensionsToAsn1=function(o){var f=D.create(D.Class.CONTEXT_SPECIFIC,3,!0,[]),h=D.create(D.Class.UNIVERSAL,D.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=D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[]);if(f.value.push(D.create(D.Class.UNIVERSAL,D.Type.OID,!1,D.oidToDer(o.id).getBytes())),o.critical)f.value.push(D.create(D.Class.UNIVERSAL,D.Type.BOOLEAN,!1,String.fromCharCode(255)));var h=o.value;if(typeof o.value!=="string")h=D.toDer(h).getBytes();return f.value.push(D.create(D.Class.UNIVERSAL,D.Type.OCTETSTRING,!1,h)),f};ge.certificationRequestToAsn1=function(o){var f=o.certificationRequestInfo||ge.getCertificationRequestInfo(o);return D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[f,D.create(D.Class.UNIVERSAL,D.Type.SEQUENCE,!0,[D.create(D.Class.UNIVERSAL,D.Type.OID,!1,D.oidToDer(o.signatureOid).getBytes()),o_(o.signatureOid,o.signatureParameters)]),D.create(D.Class.UNIVERSAL,D.Type.BITSTRING,!1,String.fromCharCode(0)+o.signature)])};ge.createCaStore=function(o){var f={certs:{}};f.getIssuer=function(C){var w=h(C.issuer);return w},f.addCertificate=function(C){if(typeof C==="string")C=qe.pki.certificateFromPem(C);if(y(C.subject),!f.hasCertificate(C))if(C.subject.hash in f.certs){var w=f.certs[C.subject.hash];if(!qe.util.isArray(w))w=[w];w.push(C),f.certs[C.subject.hash]=w}else f.certs[C.subject.hash]=C},f.hasCertificate=function(C){if(typeof C==="string")C=qe.pki.certificateFromPem(C);var w=h(C.subject);if(!w)return!1;if(!qe.util.isArray(w))w=[w];var S=D.toDer(ge.certificateToAsn1(C)).getBytes();for(var E=0;E<w.length;++E){var T=D.toDer(ge.certificateToAsn1(w[E])).getBytes();if(S===T)return!0}return!1},f.listAllCertificates=function(){var C=[];for(var w in f.certs)if(f.certs.hasOwnProperty(w)){var S=f.certs[w];if(!qe.util.isArray(S))C.push(S);else for(var E=0;E<S.length;++E)C.push(S[E])}return C},f.removeCertificate=function(C){var w;if(typeof C==="string")C=qe.pki.certificateFromPem(C);if(y(C.subject),!f.hasCertificate(C))return null;var S=h(C.subject);if(!qe.util.isArray(S))return w=f.certs[C.subject.hash],delete f.certs[C.subject.hash],w;var E=D.toDer(ge.certificateToAsn1(C)).getBytes();for(var T=0;T<S.length;++T){var k=D.toDer(ge.certificateToAsn1(S[T])).getBytes();if(E===k)w=S[T],S.splice(T,1)}if(S.length===0)delete f.certs[C.subject.hash];return w};function h(C){return y(C),f.certs[C.hash]||null}function y(C){if(!C.hash){var w=qe.md.sha1.create();C.attributes=ge.RDNAttributesAsArray(vc(C),w),C.hash=w.digest().toHex()}}if(o)for(var x=0;x<o.length;++x){var z=o[x];f.addCertificate(z)}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 z=!0,C=null,w=0;do{var S=f.shift(),E=null,T=!1;if(x){if(x<S.validity.notBefore||x>S.validity.notAfter)C={message:"Certificate is not valid yet or has expired.",error:ge.certificateError.certificate_expired,notBefore:S.validity.notBefore,notAfter:S.validity.notAfter,now:x}}if(C===null){if(E=f[0]||o.getIssuer(S),E===null){if(S.isIssuer(S))T=!0,E=S}if(E){var k=qe.util.isArray(E)?E.slice():[E],O=!1;while(!O&&k.length>0){E=k.shift();try{O=E.verify(S)}catch(ee){}}if(!O)C={message:"Certificate signature is invalid.",error:ge.certificateError.bad_certificate}}if(C===null&&(!E||T)&&!o.hasCertificate(S))C={message:"Certificate is not trusted.",error:ge.certificateError.unknown_ca}}if(C===null&&E&&!S.isIssuer(E))C={message:"Certificate issuer is invalid.",error:ge.certificateError.bad_certificate};if(C===null){var R={keyUsage:!0,basicConstraints:!0};for(var I=0;C===null&&I<S.extensions.length;++I){var A=S.extensions[I];if(A.critical&&!(A.name in R))C={message:"Certificate has an unsupported critical extension.",error:ge.certificateError.unsupported_certificate}}}if(C===null&&(!z||f.length===0&&(!E||T))){var j=S.getExtension({id:"2.5.29.19"}),P=S.getExtension("keyUsage");if(P!==null){if(!P.keyCertSign||j===null)C={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(C===null&&j===null)C={message:"Certificate is missing basicConstraints extension and cannot be used as a CA.",error:ge.certificateError.bad_certificate};if(C===null&&j!==null&&!j.cA)C={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:ge.certificateError.bad_certificate};if(C===null&&j!==null&&"pathLenConstraint"in j){var F=w-1;if(F>j.pathLenConstraint)C={message:"Certificate basicConstraints pathLenConstraint violated.",error:ge.certificateError.bad_certificate}}}var q=C===null?!0:C.error,W=h.verify?h.verify(q,w,y):q;if(W===!0)C=null;else{if(q===!0)C={message:"The application rejected the certificate.",error:ge.certificateError.bad_certificate};if(W||W===0){if(typeof W==="object"&&!qe.util.isArray(W)){if(W.message)C.message=W.message;if(W.error)C.error=W.error}else if(typeof W==="string")C.error=W}throw C}z=!1,++w}while(f.length>0);return!0}});var i_=i(function(kLe,X5){var Ft=Xe();yn();dc();qi();t_();e_();Vo();qu();mc();_t();Ph();var{asn1:G,pki:nt}=Ft,Uu=X5.exports=Ft.pkcs12=Ft.pkcs12||{},Y5={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"}]},zze={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"},Y5,{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"}]}]},Cze={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"}]},wze={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"}]},Sze={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 Fu(o,f,h,y){var x=[];for(var z=0;z<o.length;z++)for(var C=0;C<o[z].safeBags.length;C++){var w=o[z].safeBags[C];if(y!==void 0&&w.type!==y)continue;if(f===null){x.push(w);continue}if(w.attributes[f]!==void 0&&w.attributes[f].indexOf(h)>=0)x.push(w)}return x}Uu.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,zze,y,x)){var z=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw z.errors=z,z}var C={version:y.version.charCodeAt(0),safeContents:[],getBags:function(j){var P={},F;if("localKeyId"in j)F=j.localKeyId;else if("localKeyIdHex"in j)F=Ft.util.hexToBytes(j.localKeyIdHex);if(F===void 0&&!("friendlyName"in j)&&"bagType"in j)P[j.bagType]=Fu(C.safeContents,null,null,j.bagType);if(F!==void 0)P.localKeyId=Fu(C.safeContents,"localKeyId",F,j.bagType);if("friendlyName"in j)P.friendlyName=Fu(C.safeContents,"friendlyName",j.friendlyName,j.bagType);return P},getBagsByFriendlyName:function(j,P){return Fu(C.safeContents,"friendlyName",j,P)},getBagsByLocalKeyId:function(j,P){return Fu(C.safeContents,"localKeyId",j,P)}};if(y.version.charCodeAt(0)!==3){var z=Error("PKCS#12 PFX of version other than 3 not supported.");throw z.version=y.version.charCodeAt(0),z}if(G.derToOid(y.contentType)!==nt.oids.data){var z=Error("Only PKCS#12 PFX in password integrity mode supported.");throw z.oid=G.derToOid(y.contentType),z}var w=y.content.value[0];if(w.tagClass!==G.Class.UNIVERSAL||w.type!==G.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(w=n_(w),y.mac){var S=null,E=0,T=G.derToOid(y.macAlgorithm);switch(T){case nt.oids.sha1:S=Ft.md.sha1.create(),E=20;break;case nt.oids.sha256:S=Ft.md.sha256.create(),E=32;break;case nt.oids.sha384:S=Ft.md.sha384.create(),E=48;break;case nt.oids.sha512:S=Ft.md.sha512.create(),E=64;break;case nt.oids.md5:S=Ft.md.md5.create(),E=16;break}if(S===null)throw Error("PKCS#12 uses unsupported MAC algorithm: "+T);var k=new Ft.util.ByteBuffer(y.macSalt),O="macIterations"in y?parseInt(Ft.util.bytesToHex(y.macIterations),16):1;if(!(O>=1))throw Error("PKCS#12 MAC iteration count must be >= 1.");var R=Uu.generateKey(h,k,3,O,E,S),I=Ft.hmac.create();I.start(S,R),I.update(w.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 Eze(C,w.value,f,h),C};function n_(o){if(o.composed||o.constructed){var f=Ft.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 Eze(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 z=f.value[x],C={},w=[];if(!G.validate(z,Y5,C,w)){var S=Error("Cannot read ContentInfo.");throw S.errors=w,S}var E={encrypted:!1},T=null,k=C.content.value[0];switch(G.derToOid(C.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.");T=n_(k).value;break;case nt.oids.encryptedData:T=Tze(k,y),E.encrypted=!0;break;default:var S=Error("Unsupported PKCS#12 contentType.");throw S.contentType=G.derToOid(C.contentType),S}E.safeBags=kze(T,h,y),o.safeContents.push(E)}}function Tze(o,f){var h={},y=[];if(!G.validate(o,Ft.pkcs7.asn1.encryptedDataValidator,h,y)){var x=Error("Cannot read EncryptedContentInfo.");throw x.errors=y,x}var z=G.derToOid(h.contentType);if(z!==nt.oids.data){var x=Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw x.oid=z,x}z=G.derToOid(h.encAlgorithm);var C=nt.pbe.getCipher(z,h.encParameter,f),w=n_(h.encryptedContentAsn1),S=Ft.util.createBuffer(w.value);if(C.update(S),!C.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");return C.output.getBytes()}function kze(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 z=o.value[x],C={},w=[];if(!G.validate(z,Cze,C,w)){var S=Error("Cannot read SafeBag.");throw S.errors=w,S}var E={type:G.derToOid(C.bagId),attributes:Oze(C.bagAttributes)};y.push(E);var T,k,O=C.bagValue.value[0];switch(E.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{E.key=nt.privateKeyFromAsn1(O)}catch(I){E.key=null,E.asn1=O}continue;case nt.oids.certBag:T=Sze,k=function(){if(G.derToOid(C.certId)!==nt.oids.x509Certificate){var I=Error("Unsupported certificate type, only X.509 supported.");throw I.oid=G.derToOid(C.certId),I}var A=G.fromDer(C.cert,f);try{E.cert=nt.certificateFromAsn1(A,!0)}catch(j){E.cert=null,E.asn1=A}};break;default:var S=Error("Unsupported PKCS#12 SafeBag type.");throw S.oid=E.type,S}if(T!==void 0&&!G.validate(O,T,C,w)){var S=Error("Cannot read PKCS#12 "+T.name);throw S.errors=w,S}k()}return y}function Oze(o){var f={};if(o!==void 0)for(var h=0;h<o.length;++h){var y={},x=[];if(!G.validate(o[h],wze,y,x)){var z=Error("Cannot read PKCS#12 BagAttribute.");throw z.errors=x,z}var C=G.derToOid(y.oid);if(nt.oids[C]===void 0)continue;f[nt.oids[C]]=[];for(var w=0;w<y.values.length;++w)f[nt.oids[C]].push(y.values[w].value)}return f}Uu.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,z;if(x!==null)x=Ft.util.hexToBytes(x);else if(y.generateLocalKeyId)if(f){var C=Ft.util.isArray(f)?f[0]:f;if(typeof C==="string")C=nt.certificateFromPem(C);var w=Ft.md.sha1.create();w.update(G.toDer(nt.certificateToAsn1(C)).getBytes()),x=w.digest().getBytes()}else x=Ft.random.getBytes(20);var S=[];if(x!==null)S.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)S.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(S.length>0)z=G.create(G.Class.UNIVERSAL,G.Type.SET,!0,S);var E=[],T=[];if(f!==null)if(Ft.util.isArray(f))T=f;else T=[f];var k=[];for(var O=0;O<T.length;++O){if(f=T[O],typeof f==="string")f=nt.certificateFromPem(f);var R=O===0?z: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 j=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,k),P=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())])]);E.push(P)}var F=null;if(o!==null){var q=nt.wrapRsaPrivateKey(nt.privateKeyToAsn1(o));if(h===null)F=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,[q]),z]);else F=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(q,h,y)]),z]);var W=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,[F]),ee=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(W).getBytes())])]);E.push(ee)}var te=G.create(G.Class.UNIVERSAL,G.Type.SEQUENCE,!0,E),le;if(y.useMac){var w=Ft.md.sha1.create(),he=new Ft.util.ByteBuffer(Ft.random.getBytes(y.saltSize)),ye=y.count,o=Uu.generateKey(h,he,3,ye,20),ke=Ft.hmac.create();ke.start(w,o),ke.update(G.toDer(te).getBytes());var me=ke.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(ye).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])};Uu.generateKey=Ft.pbe.generatePkcs12Key});var a_=i(function(OLe,Q5){var Vi=Xe();yn();qi();e_();$s();Ch();i_();Ih();qu();_t();Ph();var s_=Vi.asn1,_c=Q5.exports=Vi.pki=Vi.pki||{};_c.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)};_c.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=s_.fromDer(f.body);return _c.privateKeyFromAsn1(y)};_c.privateKeyToPem=function(o,f){var h={type:"RSA PRIVATE KEY",body:s_.toDer(_c.privateKeyToAsn1(o)).getBytes()};return Vi.pem.encode(h,{maxline:f})};_c.privateKeyInfoToPem=function(o,f){var h={type:"PRIVATE KEY",body:s_.toDer(o).getBytes()};return Vi.pem.encode(h,{maxline:f})}});var f_=i(function(ILe,aq){var de=Xe();yn();dc();bh();$s();a_();Vo();mc();_t();var Nh=function(o,f,h,y){var x=de.util.createBuffer(),z=o.length>>1,C=z+(o.length&1),w=o.substr(0,C),S=o.substr(z,C),E=de.util.createBuffer(),T=de.hmac.create();h=f+h;var k=Math.ceil(y/16),O=Math.ceil(y/20);T.start("MD5",w);var R=de.util.createBuffer();E.putBytes(h);for(var I=0;I<k;++I)T.start(null,null),T.update(E.getBytes()),E.putBuffer(T.digest()),T.start(null,null),T.update(E.bytes()+h),R.putBuffer(T.digest());T.start("SHA1",S);var A=de.util.createBuffer();E.clear(),E.putBytes(h);for(var I=0;I<O;++I)T.start(null,null),T.update(E.getBytes()),E.putBuffer(T.digest()),T.start(null,null),T.update(E.bytes()+h),A.putBuffer(T.digest());return x.putBytes(de.util.xorBytes(R.getBytes(),A.getBytes(),y)),x},Ize=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()},Rze=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(z){}return y},Aze=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(z){}return y},Oo=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))},Wo=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 z=f.fragment,C=z.length();if(y={version:{major:z.getByte(),minor:z.getByte()},random:de.util.createBuffer(z.getBytes(32)),session_id:Oo(z,1),extensions:[]},x)y.cipher_suite=z.getBytes(2),y.compression_method=z.getByte();else y.cipher_suites=Oo(z,2),y.compression_methods=Oo(z,1);if(C=h-(C-z.length()),C>0){var w=Oo(z,2);while(w.length()>0)y.extensions.push({type:[w.getByte(),w.getByte()],data:Oo(w,2)});if(!x)for(var S=0;S<y.extensions.length;++S){var E=y.extensions[S];if(E.type[0]===0&&E.type[1]===0){var T=Oo(E.data,2);while(T.length()>0){var k=T.getByte();if(k!==0)break;o.session.extensions.server_name.serverNameList.push(Oo(T,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,z=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:z}};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=rq,o.session.resuming=!0,o.session.sp.server_random=y.random.bytes();else o.expect=Dze,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(),z=null;if(o.sessionCache){if(z=o.sessionCache.getSession(x),z===null)x="";else if(z.version.major!==y.version.major||z.version.minor>y.version.minor)z=null,x=""}if(x.length===0)x=de.random.getBytes(32);if(o.session.id=x,o.session.clientHelloVersion=y.version,o.session.sp={},z)o.version=o.session.version=z.version,o.session.sp=z.sp;else{var C;for(var w=1;w<L.SupportedVersions.length;++w)if(C=L.SupportedVersions[w],C.minor<=y.version.minor)break;o.version={major:C.major,minor:C.minor},o.session.version=o.version}if(z!==null)o.expect=d_,o.session.resuming=!0,o.session.sp.client_random=y.random.bytes();else o.expect=o.verifyClient!==!1?Fze:u_,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:Oo(y,3)},z,C,w=[];try{while(x.certificate_list.length()>0)z=Oo(x.certificate_list,3),C=de.asn1.fromDer(z),z=de.pki.certificateFromAsn1(C,!0),w.push(z)}catch(E){return o.error(o,{message:"Could not parse certificate list.",cause:E,send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.bad_certificate}})}var S=o.entity===L.ConnectionEnd.client;if((S||o.verifyClient===!0)&&w.length===0)o.error(o,{message:S?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.illegal_parameter}});else if(w.length===0)o.expect=S?eq:u_;else{if(S)o.session.serverCertificate=w[0];else o.session.clientCertificate=w[0];if(L.verifyCertificateChain(o,w))o.expect=S?eq:u_}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=Bze,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:Oo(y,2).getBytes()},z=null;if(o.getPrivateKey)try{z=o.getPrivateKey(o,o.session.serverCertificate),z=de.pki.privateKeyFromPem(z)}catch(S){o.error(o,{message:"Could not get private key.",cause:S,send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}})}if(z===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 C=o.session.sp;C.pre_master_secret=z.decrypt(x.enc_pre_master_secret);var w=o.session.clientHelloVersion;if(w.major!==C.pre_master_secret.charCodeAt(0)||w.minor!==C.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.")}catch(S){C.pre_master_secret=de.random.getBytes(48)}if(o.expect=d_,o.session.clientCertificate!==null)o.expect=Uze;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:Oo(y,1),certificate_authorities:Oo(y,2)};o.session.certificateRequest=x,o.expect=Lze,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 z={signature:Oo(y,2).getBytes()},C=de.util.createBuffer();C.putBuffer(o.session.md5.digest()),C.putBuffer(o.session.sha1.digest()),C=C.getBytes();try{var w=o.session.clientCertificate;if(!w.publicKey.verify(C,z.signature,"NONE"))throw Error("CertificateVerify signature does not match.");o.session.md5.update(x),o.session.sha1.update(x)}catch(S){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=d_,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.session.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,z=o.verify(o,y.alert.description,x,[]);if(z!==!0){if(z||z===0){if(typeof z==="object"&&!de.util.isArray(z)){if(z.message)y.message=z.message;if(z.alert)y.alert.description=z.alert}else if(typeof z==="number")y.alert.description=z}}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=Mze;var C=function(w,S){if(w.session.certificateRequest!==null&&w.session.clientCertificate!==null)L.queue(w,L.createRecord(w,{type:L.ContentType.handshake,data:L.createCertificateVerify(w,S)}));L.queue(w,L.createRecord(w,{type:L.ContentType.change_cipher_spec,data:L.createChangeCipherSpec()})),w.state.pending=L.createConnectionState(w),w.state.current.write=w.state.pending.write,L.queue(w,L.createRecord(w,{type:L.ContentType.handshake,data:L.createFinished(w)})),w.expect=rq,L.flush(w),w.process()};if(o.session.certificateRequest===null||o.session.clientCertificate===null)return C(o,null);L.getClientSignature(o,C)};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?Nze:$ze,o.process()};L.handleFinished=function(o,f,h){var y=f.fragment;y.read-=4;var x=y.bytes();y.read+=4;var z=f.fragment.getBytes();y=de.util.createBuffer(),y.putBuffer(o.session.md5.digest()),y.putBuffer(o.session.sha1.digest());var C=o.entity===L.ConnectionEnd.client,w=C?"server finished":"client finished",S=o.session.sp,E=12,T=Nh;if(y=T(S.master_secret,w,y.getBytes(),E),y.getBytes()!==z)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&&C||!o.session.resuming&&!C)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=C?jze:Vze,o.handshaking=!1,++o.handshakes,o.peerCertificate=C?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 z=h.bytes(x+4);if(h.read+=4,y in Lh[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(z),o.session.sha1.update(z);Lh[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(),z=h.getBytes(x);if(y===L.HeartbeatMessageType.heartbeat_request){if(o.handshakes===0||o.handshaking||x>z.length)return o.process();L.queue(o,L.createRecord(o,{type:L.ContentType.heartbeat,data:L.createHeartbeat(L.HeartbeatMessageType.heartbeat_response,z)})),L.flush(o)}else if(y===L.HeartbeatMessageType.heartbeat_response){if(z!==o.expectedHeartbeatPayload)return o.process();if(o.heartbeatReceived)o.heartbeatReceived(o,de.util.createBuffer(z))}o.process()};var Pze=0,Dze=1,eq=2,Bze=3,Lze=4,rq=5,Nze=6,jze=7,Mze=8,qze=0,Fze=1,u_=2,Uze=3,d_=4,$ze=5,Vze=6,{handleUnexpected:B,handleChangeCipherSpec:oq,handleAlert:Nr,handleHandshake:ro,handleApplicationData:nq,handleHeartbeat:jr}=L,p_=[];p_[L.ConnectionEnd.client]=[[B,Nr,ro,B,jr],[B,Nr,ro,B,jr],[B,Nr,ro,B,jr],[B,Nr,ro,B,jr],[B,Nr,ro,B,jr],[oq,Nr,B,B,jr],[B,Nr,ro,B,jr],[B,Nr,ro,nq,jr],[B,Nr,ro,B,jr]];p_[L.ConnectionEnd.server]=[[B,Nr,ro,B,jr],[B,Nr,ro,B,jr],[B,Nr,ro,B,jr],[B,Nr,ro,B,jr],[oq,Nr,B,B,jr],[B,Nr,ro,B,jr],[B,Nr,ro,nq,jr],[B,Nr,ro,B,jr]];var{handleHelloRequest:Hi,handleServerHello:Hze,handleCertificate:iq,handleServerKeyExchange:tq,handleCertificateRequest:c_,handleServerHelloDone:Dh,handleFinished:sq}=L,Lh=[];Lh[L.ConnectionEnd.client]=[[B,B,Hze,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,iq,tq,c_,Dh,B,B,B,B,B,B],[Hi,B,B,B,B,B,B,B,B,B,B,B,tq,c_,Dh,B,B,B,B,B,B],[Hi,B,B,B,B,B,B,B,B,B,B,B,B,c_,Dh,B,B,B,B,B,B],[Hi,B,B,B,B,B,B,B,B,B,B,B,B,B,Dh,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,sq],[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:Gze,handleClientKeyExchange:Kze,handleCertificateVerify:Wze}=L;Lh[L.ConnectionEnd.server]=[[B,Gze,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,iq,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,Kze,B,B,B,B],[B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,Wze,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,sq],[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=Nh,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,z=o.version.major===L.Versions.TLS_1_0.major&&o.version.minor===L.Versions.TLS_1_0.minor;if(z)x+=2*f.fixed_iv_length;var C=h(f.master_secret,"key expansion",y,x),w={client_write_MAC_key:C.getBytes(f.mac_key_length),server_write_MAC_key:C.getBytes(f.mac_key_length),client_write_key:C.getBytes(f.enc_key_length),server_write_key:C.getBytes(f.enc_key_length)};if(z)w.client_write_IV=C.getBytes(f.fixed_iv_length),w.server_write_IV=C.getBytes(f.fixed_iv_length);return w};L.createConnectionState=function(o){var f=o.entity===L.ConnectionEnd.client,h=function(){var z={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(C){return!0},compressionState:null,compressFunction:function(C){return!0},updateSequenceNumber:function(){if(z.sequenceNumber[1]===4294967295)z.sequenceNumber[1]=0,++z.sequenceNumber[0];else++z.sequenceNumber[1]}};return z},y={read:h(),write:h()};if(y.read.update=function(z,C){if(!y.read.cipherFunction(C,y.read))z.error(z,{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,C,y.read))z.error(z,{message:"Could not decompress record.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.decompression_failure}});return!z.fail},y.write.update=function(z,C){if(!y.write.compressFunction(z,C,y.write))z.error(z,{message:"Could not compress record.",send:!1,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}});else if(!y.write.cipherFunction(C,y.write))z.error(z,{message:"Could not encrypt record.",send:!1,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}});return!z.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=Aze,y.write.compressFunction=Rze;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(),z=de.util.createBuffer();z.putByte(L.CompressionMethod.none);var C=z.length(),w=de.util.createBuffer();if(o.virtualHost){var S=de.util.createBuffer();S.putByte(0),S.putByte(0);var E=de.util.createBuffer();E.putByte(0),Wo(E,2,de.util.createBuffer(o.virtualHost));var T=de.util.createBuffer();Wo(T,2,E),Wo(S,2,T),w.putBuffer(S)}var k=w.length();if(k>0)k+=2;var O=o.session.id,R=O.length+1+2+4+28+2+x+1+C+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),Wo(I,1,de.util.createBuffer(O)),Wo(I,2,f),Wo(I,1,z),k>0)Wo(I,2,w);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),Wo(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 z=null;for(var C=0;C<h.length;++C){var w=de.pem.decode(h[C])[0];if(w.type!=="CERTIFICATE"&&w.type!=="X509 CERTIFICATE"&&w.type!=="TRUSTED CERTIFICATE"){var S=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw S.headerType=w.type,S}if(w.procType&&w.procType.type==="ENCRYPTED")throw Error("Could not convert certificate from PEM; PEM is encrypted.");var E=de.util.createBuffer(w.body);if(z===null)z=de.asn1.fromDer(E.bytes(),!1);var T=de.util.createBuffer();Wo(T,3,E),x.putBuffer(T)}if(h=de.pki.certificateFromAsn1(z),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),Wo(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,z=de.util.createBuffer();return z.putByte(L.HandshakeType.client_key_exchange),z.putInt24(x),z.putInt16(f.length),z.putBytes(f),z};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,z){var C=null;if(y.getPrivateKey)try{C=y.getPrivateKey(y,y.session.clientCertificate),C=de.pki.privateKeyFromPem(C)}catch(w){y.error(y,{message:"Could not get private key.",cause:w,send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.internal_error}})}if(C===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=C.sign(x,null);z(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],z=de.pki.distinguishedNameToAsn1(x.subject),C=de.asn1.toDer(z);h.putInt16(C.length()),h.putBuffer(C)}var w=1+f.length()+2+h.length(),S=de.util.createBuffer();return S.putByte(L.HandshakeType.certificate_request),S.putInt24(w),Wo(S,1,f),Wo(S,2,h),S};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,z=Nh,C=h?"client finished":"server finished";f=z(y.master_secret,C,f.getBytes(),x);var w=de.util.createBuffer();return w.putByte(L.HandshakeType.finished),w.putInt24(f.length()),w.putBuffer(f),w};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(),z=Math.max(16,x-h-3);return y.putBytes(de.random.getBytes(z)),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 z=0;z<y.length&&!o.fail;++z){var C=y[z],w=o.state.current.write;if(w.update(o,C))o.records.push(C)}};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 l_=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}},Jze=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,w){var S=l_(z),E=o.verify(o,z,C,w);if(E!==!0){if(typeof E==="object"&&!de.util.isArray(E)){var T=Error("The application rejected the certificate.");if(T.send=!0,T.alert={level:L.Alert.Level.fatal,description:L.Alert.Description.bad_certificate},E.message)T.message=E.message;if(E.alert)T.alert.description=E.alert;throw T}if(E!==z)E=Jze(E)}return E},de.pki.verifyCertificateChain(o.caStore,f,h)}catch(z){var x=z;if(typeof x!=="object"||de.util.isArray(x))x={send:!0,alert:{level:L.Alert.Level.fatal,description:l_(z)}};if(!("send"in x))x.send=!0;if(!("alert"in x))x.alert={level:L.Alert.Level.fatal,description:l_(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 z=null,C=null;if(x)C=de.util.bytesToHex(x);else if(h.order.length>0)C=h.order[0];if(C!==null&&C in h.cache){z=h.cache[C],delete h.cache[C];for(var w in h.order)if(h.order[w]===C){h.order.splice(w,1);break}}return z},h.setSession=function(x,z){if(h.order.length===h.capacity){var C=h.order.shift();delete h.cache[C]}var C=de.util.bytesToHex(x);h.order.push(C),h.cache[C]=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,z=o.sessionCache?L.createSessionCache(o.sessionCache):null,C={version:{major:L.Version.major,minor:L.Version.minor},entity:x,sessionId:o.sessionId,caStore:f,sessionCache:z,cipherSuites:h,connected:o.connected,virtualHost:o.virtualHost||null,verifyClient:o.verifyClient||!1,verify:o.verify||function(R,I,A,j){return I},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(R,I){if(I.origin=I.origin||(R.entity===L.ConnectionEnd.client?"client":"server"),I.send)L.queue(R,L.createAlert(R,I.alert)),L.flush(R);var A=I.fatal!==!1;if(A)R.fail=!0;if(o.error(R,I),A)R.close(!1)},deflate:o.deflate||null,inflate:o.inflate||null};C.reset=function(R){C.version={major:L.Version.major,minor:L.Version.minor},C.record=null,C.session=null,C.peerCertificate=null,C.state={pending:null,current:null},C.expect=C.entity===L.ConnectionEnd.client?Pze:qze,C.fragmented=null,C.records=[],C.open=!1,C.handshakes=0,C.handshaking=!1,C.isConnected=!1,C.fail=!(R||typeof R>"u"),C.input.clear(),C.tlsData.clear(),C.data.clear(),C.state.current=L.createConnectionState(C)},C.reset();var w=function(R,I){var A=I.type-L.ContentType.change_cipher_spec,j=p_[R.entity][R.expect];if(A in j)j[A](R,I);else L.handleUnexpected(R,I)},S=function(R){var I=0,A=R.input,j=A.length();if(j<5)I=5-j;else{R.record={type:A.getByte(),version:{major:A.getByte(),minor:A.getByte()},length:A.getInt16(),fragment:de.util.createBuffer(),ready:!1};var P=R.record.version.major===R.version.major;if(P&&R.session&&R.session.version)P=R.record.version.minor===R.version.minor;if(!P)R.error(R,{message:"Incompatible TLS version.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.protocol_version}})}return I},E=function(R){var I=0,A=R.input,j=A.length();if(j<R.record.length)I=R.record.length-j;else{R.record.fragment.putBytes(A.getBytes(R.record.length)),A.compact();var P=R.state.current.read;if(P.update(R,R.record)){if(R.fragmented!==null)if(R.fragmented.type===R.record.type)R.fragmented.fragment.putBuffer(R.record.fragment),R.record=R.fragmented;else return R.error(R,{message:"Invalid fragmented record.",send:!0,alert:{level:L.Alert.Level.fatal,description:L.Alert.Description.unexpected_message}}),I;R.record.ready=!0}}return I};C.handshake=function(R){if(C.entity!==L.ConnectionEnd.client)C.error(C,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(C.handshaking)C.error(C,{message:"Handshake already in progress.",fatal:!1});else{if(C.fail&&!C.open&&C.handshakes===0)C.fail=!1;C.handshaking=!0,R=R||"";var I=null;if(R.length>0){if(C.sessionCache)I=C.sessionCache.getSession(R);if(I===null)R=""}if(R.length===0&&C.sessionCache){if(I=C.sessionCache.getSession(),I!==null)R=I.id}if(C.session={id:R,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:de.md.md5.create(),sha1:de.md.sha1.create()},I)C.version=I.version,C.session.sp=I.sp;C.session.sp.client_random=L.createRandom().getBytes(),C.open=!0,L.queue(C,L.createRecord(C,{type:L.ContentType.handshake,data:L.createClientHello(C)})),L.flush(C)}};var T=!1,k=!1,O=function(R){var I=0;if(!R.fail){if(R.record!==null&&R.record.ready&&R.record.fragment.isEmpty())R.record=null;if(R.record===null)I=S(R);if(!R.fail&&R.record!==null&&!R.record.ready)I=E(R);if(!R.fail&&R.record!==null&&R.record.ready)w(R,R.record)}return I};return C.process=function(R){var I=0;if(R)C.input.putBytes(R);if(T&&typeof R>"u")return k=!0,I;var A=T,j=k;T=!0,k=!1;try{I=O(C);while(k)k=!1,O(C)}finally{T=A,k=j}return I},C.prepare=function(R){return L.queue(C,L.createRecord(C,{type:L.ContentType.application_data,data:de.util.createBuffer(R)})),L.flush(C)},C.prepareHeartbeatRequest=function(R,I){if(R instanceof de.util.ByteBuffer)R=R.bytes();if(typeof I>"u")I=R.length;return C.expectedHeartbeatPayload=R,L.queue(C,L.createRecord(C,{type:L.ContentType.heartbeat,data:L.createHeartbeat(L.HeartbeatMessageType.heartbeat_request,R,I)})),L.flush(C)},C.close=function(R){if(!C.fail&&C.sessionCache&&C.session){var I={id:C.session.id,version:C.session.version,sp:C.session.sp};I.sp.keys=null,C.sessionCache.setSession(I.id,I)}if(C.open){if(C.open=!1,C.input.clear(),C.isConnected||C.handshaking)C.isConnected=C.handshaking=!1,L.queue(C,L.createAlert(C,{level:L.Alert.Level.warning,description:L.Alert.Description.close_notify})),L.flush(C);C.closed(C)}C.reset(R)},C};aq.exports=de.tls=de.tls||{};for($u in L)if(typeof L[$u]!=="function")de.tls[$u]=L[$u];var $u;de.tls.prf_tls1=Nh;de.tls.hmac_sha1=Ize;de.tls.createSessionCache=L.createSessionCache;de.tls.createConnection=L.createConnection});var uq=i(function(RLe,lq){var Gi=Xe();Mi();f_();var Jo=lq.exports=Gi.tls;Jo.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=Jo.BulkCipherAlgorithm.aes,o.cipher_type=Jo.CipherType.block,o.enc_key_length=16,o.block_length=16,o.fixed_iv_length=16,o.record_iv_length=16,o.mac_algorithm=Jo.MACAlgorithm.hmac_sha1,o.mac_length=20,o.mac_key_length=20},initConnectionState:cq};Jo.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=Jo.BulkCipherAlgorithm.aes,o.cipher_type=Jo.CipherType.block,o.enc_key_length=32,o.block_length=16,o.fixed_iv_length=16,o.record_iv_length=16,o.mac_algorithm=Jo.MACAlgorithm.hmac_sha1,o.mac_length=20,o.mac_key_length=20},initConnectionState:cq};function cq(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=Zze,o.read.macLength=o.write.macLength=h.mac_length,o.read.macFunction=o.write.macFunction=Jo.hmac_sha1}function Zze(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===Jo.Versions.TLS_1_0.minor)x=f.cipherState.init?null:f.cipherState.iv;else x=Gi.random.getBytesSync(16);f.cipherState.init=!0;var z=f.cipherState.cipher;if(z.start({iv:x}),o.version.minor>=Jo.Versions.TLS_1_1.minor)z.output.putBytes(x);if(z.update(o.fragment),z.finish(Yze))o.fragment=z.output,o.length=o.fragment.length(),h=!0;return h}function Yze(o,f,h){if(!h){var y=o-f.length()%o;f.fillWithByte(y-1,y)}return!0}function Xze(o,f,h){var y=!0;if(h){var x=f.length(),z=f.last();for(var C=x-1-z;C<x-1;++C)y=y&&f.at(C)==z;if(y)f.truncate(z+1)}return y}function Qze(o,f){var h=!1,y;if(o.version.minor===Jo.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(Xze);var z=f.macLength,C=Gi.random.getBytesSync(z),w=x.output.length();if(w>=z)o.fragment=x.output.getBytes(w-z),C=x.output.getBytes(z);else o.fragment=x.output.getBytes();o.fragment=Gi.util.createBuffer(o.fragment),o.length=o.fragment.length();var S=f.macFunction(f.macKey,f.sequenceNumber,o);return f.updateSequenceNumber(),h=e1e(f.macKey,C,S)&&h,h}function e1e(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 g_=i(function(ALe,hq){var Ht=Xe();Dn();_t();var Vu=hq.exports=Ht.sha512=Ht.sha512||{};Ht.md.sha512=Ht.md.algorithms.sha512=Vu;var pq=Ht.sha384=Ht.sha512.sha384=Ht.sha512.sha384||{};pq.create=function(){return Vu.create("SHA-384")};Ht.md.sha384=Ht.md.algorithms.sha384=pq;Ht.sha512.sha256=Ht.sha512.sha256||{create:function(){return Vu.create("SHA-512/256")}};Ht.md["sha512/256"]=Ht.md.algorithms["sha512/256"]=Ht.sha512.sha256;Ht.sha512.sha224=Ht.sha512.sha224||{create:function(){return Vu.create("SHA-512/224")}};Ht.md["sha512/224"]=Ht.md.algorithms["sha512/224"]=Ht.sha512.sha224;Vu.create=function(o){if(!fq)t1e();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=Ht.util.createBuffer(),x=Array(80);for(var z=0;z<80;++z)x[z]=[,,];var C=64;switch(o){case"SHA-384":C=48;break;case"SHA-512/256":C=32;break;case"SHA-512/224":C=28;break}var w={algorithm:o.replace("-","").toLowerCase(),blockLength:128,digestLength:C,messageLength:0,fullMessageLength:null,messageLengthSize:16};return w.start=function(){w.messageLength=0,w.fullMessageLength=w.messageLength128=[];var S=w.messageLengthSize/4;for(var E=0;E<S;++E)w.fullMessageLength.push(0);y=Ht.util.createBuffer(),h=Array(f.length);for(var E=0;E<f.length;++E)h[E]=f[E].slice(0);return w},w.start(),w.update=function(S,E){if(E==="utf8")S=Ht.util.encodeUtf8(S);var T=S.length;w.messageLength+=T,T=[T/4294967296>>>0,T>>>0];for(var k=w.fullMessageLength.length-1;k>=0;--k)w.fullMessageLength[k]+=T[1],T[1]=T[0]+(w.fullMessageLength[k]/4294967296>>>0),w.fullMessageLength[k]=w.fullMessageLength[k]>>>0,T[0]=T[1]/4294967296>>>0;if(y.putBytes(S),dq(h,x,y),y.read>2048||y.length()===0)y.compact();return w},w.digest=function(){var S=Ht.util.createBuffer();S.putBytes(y.bytes());var E=w.fullMessageLength[w.fullMessageLength.length-1]+w.messageLengthSize,T=E&w.blockLength-1;S.putBytes(h_.substr(0,w.blockLength-T));var k,O,R=w.fullMessageLength[0]*8;for(var I=0;I<w.fullMessageLength.length-1;++I)k=w.fullMessageLength[I+1]*8,O=k/4294967296>>>0,R+=O,S.putInt32(R>>>0),R=k>>>0;S.putInt32(R);var A=Array(h.length);for(var I=0;I<h.length;++I)A[I]=h[I].slice(0);dq(A,x,S);var j=Ht.util.createBuffer(),P;if(o==="SHA-512")P=A.length;else if(o==="SHA-384")P=A.length-2;else P=A.length-4;for(var I=0;I<P;++I)if(j.putInt32(A[I][0]),I!==P-1||o!=="SHA-512/224")j.putInt32(A[I][1]);return j},w};var h_=null,fq=!1,m_=null,ta=null;function t1e(){h_=String.fromCharCode(128),h_+=Ht.util.fillString(String.fromCharCode(0),128),m_=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],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]],fq=!0}function dq(o,f,h){var y,x,z,C,w,S,E,T,k,O,R,I,A,j,P,F,q,W,ee,te,le,he,ye,ke,me,Ae,He,Le,Pe,re,oe,Ke,Pt,Ce,De,Ne=h.length();while(Ne>=128){for(Pe=0;Pe<16;++Pe)f[Pe][0]=h.getInt32()>>>0,f[Pe][1]=h.getInt32()>>>0;for(;Pe<80;++Pe)Ke=f[Pe-2],re=Ke[0],oe=Ke[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,Ce=f[Pe-15],re=Ce[0],oe=Ce[1],z=((re>>>1|oe<<31)^(re>>>8|oe<<24)^re>>>7)>>>0,C=((re<<31|oe>>>1)^(re<<24|oe>>>8)^(re<<25|oe>>>7))>>>0,Pt=f[Pe-7],De=f[Pe-16],oe=x+Pt[1]+C+De[1],f[Pe][0]=y+Pt[0]+z+De[0]+(oe/4294967296>>>0)>>>0,f[Pe][1]=oe>>>0;A=o[0][0],j=o[0][1],P=o[1][0],F=o[1][1],q=o[2][0],W=o[2][1],ee=o[3][0],te=o[3][1],le=o[4][0],he=o[4][1],ye=o[5][0],ke=o[5][1],me=o[6][0],Ae=o[6][1],He=o[7][0],Le=o[7][1];for(Pe=0;Pe<80;++Pe)E=((le>>>14|he<<18)^(le>>>18|he<<14)^(he>>>9|le<<23))>>>0,T=((le<<18|he>>>14)^(le<<14|he>>>18)^(he<<23|le>>>9))>>>0,k=(me^le&(ye^me))>>>0,O=(Ae^he&(ke^Ae))>>>0,w=((A>>>28|j<<4)^(j>>>2|A<<30)^(j>>>7|A<<25))>>>0,S=((A<<4|j>>>28)^(j<<30|A>>>2)^(j<<25|A>>>7))>>>0,R=(A&P|q&(A^P))>>>0,I=(j&F|W&(j^F))>>>0,oe=Le+T+O+m_[Pe][1]+f[Pe][1],y=He+E+k+m_[Pe][0]+f[Pe][0]+(oe/4294967296>>>0)>>>0,x=oe>>>0,oe=S+I,z=w+R+(oe/4294967296>>>0)>>>0,C=oe>>>0,He=me,Le=Ae,me=ye,Ae=ke,ye=le,ke=he,oe=te+x,le=ee+y+(oe/4294967296>>>0)>>>0,he=oe>>>0,ee=q,te=W,q=P,W=F,P=A,F=j,oe=x+C,A=y+z+(oe/4294967296>>>0)>>>0,j=oe>>>0;oe=o[0][1]+j,o[0][0]=o[0][0]+A+(oe/4294967296>>>0)>>>0,o[0][1]=oe>>>0,oe=o[1][1]+F,o[1][0]=o[1][0]+P+(oe/4294967296>>>0)>>>0,o[1][1]=oe>>>0,oe=o[2][1]+W,o[2][0]=o[2][0]+q+(oe/4294967296>>>0)>>>0,o[2][1]=oe>>>0,oe=o[3][1]+te,o[3][0]=o[3][0]+ee+(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]+ke,o[5][0]=o[5][0]+ye+(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]+Le,o[7][0]=o[7][0]+He+(oe/4294967296>>>0)>>>0,o[7][1]=oe>>>0,Ne-=128}}});var mq=i(function(o1e){var r1e=Xe();yn();var Tr=r1e.asn1;o1e.privateKeyValidator={name:"PrivateKeyInfo",tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};o1e.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var Tq=i(function(DLe,Eq){var Mr=Xe();Mu();Vo();g_();_t();var xq=mq(),{publicKeyValidator:s1e,privateKeyValidator:a1e}=xq;if(typeof b_>"u")b_=Mr.jsbn.BigInteger;var b_,v_=Mr.util.ByteBuffer,xo=typeof Buffer>"u"?Uint8Array:Buffer;Mr.pki=Mr.pki||{};Eq.exports=Mr.pki.ed25519=Mr.ed25519=Mr.ed25519||{};var it=Mr.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=Mr.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 xo(it.constants.PUBLIC_KEY_BYTE_LENGTH),y=new xo(it.constants.PRIVATE_KEY_BYTE_LENGTH);for(var x=0;x<32;++x)y[x]=f[x];return d1e(h,y),{publicKey:h,privateKey:y}};it.privateKeyFromAsn1=function(o){var f={},h=[],y=Mr.asn1.validate(o,a1e,f,h);if(!y){var x=Error("Invalid Key.");throw x.errors=h,x}var z=Mr.asn1.derToOid(f.privateKeyOid),C=Mr.oids.EdDSA25519;if(z!==C)throw Error('Invalid OID "'+z+'"; OID must be "'+C+'".');var w=f.privateKey,S=li({message:Mr.asn1.fromDer(w).value,encoding:"binary"});return{privateKeyBytes:S}};it.publicKeyFromAsn1=function(o){var f={},h=[],y=Mr.asn1.validate(o,s1e,f,h);if(!y){var x=Error("Invalid Key.");throw x.errors=h,x}var z=Mr.asn1.derToOid(f.publicKeyOid),C=Mr.oids.EdDSA25519;if(z!==C)throw Error('Invalid OID "'+z+'"; OID must be "'+C+'".');var w=f.ed25519PublicKey;if(w.length!==it.constants.PUBLIC_KEY_BYTE_LENGTH)throw Error("Key length is invalid.");return li({message:w,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 xo(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 xo(it.constants.SIGN_BYTE_LENGTH+f.length);p1e(x,f,f.length,h);var z=new xo(it.constants.SIGN_BYTE_LENGTH);for(var C=0;C<z.length;++C)z[C]=x[C];return z};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 xo(it.constants.SIGN_BYTE_LENGTH+f.length),z=new xo(it.constants.SIGN_BYTE_LENGTH+f.length),C;for(C=0;C<it.constants.SIGN_BYTE_LENGTH;++C)x[C]=h[C];for(C=0;C<f.length;++C)x[C+it.constants.SIGN_BYTE_LENGTH]=f[C];return f1e(z,x,x.length,y)>=0};function li(o){var f=o.message;if(f instanceof Uint8Array||f instanceof xo)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 v_(f,h)}else if(!(f instanceof v_))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 xo(f.length());for(var x=0;x<y.length;++x)y[x]=f.at(x);return y}var x_=Ve(),Mh=Ve([1]),c1e=Ve([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l1e=Ve([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),gq=Ve([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),yq=Ve([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),Hu=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]),u1e=Ve([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function Gu(o,f){var h=Mr.md.sha512.create(),y=new v_(o);h.update(y.getBytes(f),"binary");var x=h.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(x,"binary");var z=new xo(it.constants.HASH_BYTE_LENGTH);for(var C=0;C<64;++C)z[C]=x.charCodeAt(C);return z}function d1e(o,f){var h=[Ve(),Ve(),Ve(),Ve()],y,x=Gu(f,32);x[0]&=248,x[31]&=127,x[31]|=64,w_(h,x),C_(o,h);for(y=0;y<32;++y)f[y+32]=o[y];return 0}function p1e(o,f,h,y){var x,z,C=new Float64Array(64),w=[Ve(),Ve(),Ve(),Ve()],S=Gu(y,32);S[0]&=248,S[31]&=127,S[31]|=64;var E=h+64;for(x=0;x<h;++x)o[64+x]=f[x];for(x=0;x<32;++x)o[32+x]=S[32+x];var T=Gu(o.subarray(32),h+32);__(T),w_(w,T),C_(o,w);for(x=32;x<64;++x)o[x]=y[x];var k=Gu(o,h+64);__(k);for(x=32;x<64;++x)C[x]=0;for(x=0;x<32;++x)C[x]=T[x];for(x=0;x<32;++x)for(z=0;z<32;z++)C[x+z]+=k[x]*S[z];return _q(o.subarray(32),C),E}function f1e(o,f,h,y){var x,z,C=new xo(32),w=[Ve(),Ve(),Ve(),Ve()],S=[Ve(),Ve(),Ve(),Ve()];if(z=-1,h<64)return-1;if(m1e(S,y))return-1;if(!h1e(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 E=Gu(o,h);if(__(E),wq(w,S,E),w_(S,f.subarray(32)),z_(w,S),C_(C,w),h-=64,zq(f,0,C,0)){for(x=0;x<h;++x)o[x]=0;return-1}for(x=0;x<h;++x)o[x]=f[x+64];return z=h,z}function h1e(o,f){var h;for(h=31;h>=0;--h){if(o[f+h]<Hu[h])return!0;if(o[f+h]>Hu[h])return!1}return!1}function _q(o,f){var h,y,x,z;for(y=63;y>=32;--y){h=0;for(x=y-32,z=y-12;x<z;++x)f[x]+=h-16*f[y]*Hu[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)*Hu[x],h=f[x]>>8,f[x]&=255;for(x=0;x<32;++x)f[x]-=h*Hu[x];for(y=0;y<32;++y)f[y+1]+=f[y]>>8,o[y]=f[y]&255}function __(o){var f=new Float64Array(64);for(var h=0;h<64;++h)f[h]=o[h],o[h]=0;_q(o,f)}function z_(o,f){var h=Ve(),y=Ve(),x=Ve(),z=Ve(),C=Ve(),w=Ve(),S=Ve(),E=Ve(),T=Ve();Cc(h,o[1],o[0]),Cc(T,f[1],f[0]),Lt(h,h,T),zc(y,o[0],o[1]),zc(T,f[0],f[1]),Lt(y,y,T),Lt(x,o[3],f[3]),Lt(x,x,l1e),Lt(z,o[2],f[2]),zc(z,z,z),Cc(C,y,h),Cc(w,z,x),zc(S,z,x),zc(E,y,h),Lt(o[0],C,w),Lt(o[1],E,S),Lt(o[2],S,w),Lt(o[3],C,E)}function bq(o,f,h){for(var y=0;y<4;++y)Sq(o[y],f[y],h)}function C_(o,f){var h=Ve(),y=Ve(),x=Ve();v1e(x,f[2]),Lt(h,f[0],x),Lt(y,f[1],x),Uh(o,y),o[31]^=Cq(h)<<7}function Uh(o,f){var h,y,x,z=Ve(),C=Ve();for(h=0;h<16;++h)C[h]=f[h];y_(C),y_(C),y_(C);for(y=0;y<2;++y){z[0]=C[0]-65517;for(h=1;h<15;++h)z[h]=C[h]-65535-(z[h-1]>>16&1),z[h-1]&=65535;z[15]=C[15]-32767-(z[14]>>16&1),x=z[15]>>16&1,z[14]&=65535,Sq(C,z,1-x)}for(h=0;h<16;h++)o[2*h]=C[h]&255,o[2*h+1]=C[h]>>8}function m1e(o,f){var h=Ve(),y=Ve(),x=Ve(),z=Ve(),C=Ve(),w=Ve(),S=Ve();if(Ki(o[2],Mh),g1e(o[1],f),ra(x,o[1]),Lt(z,x,c1e),Cc(x,x,o[2]),zc(z,o[2],z),ra(C,z),ra(w,C),Lt(S,w,C),Lt(h,S,x),Lt(h,h,z),y1e(h,h),Lt(h,h,x),Lt(h,h,z),Lt(h,h,z),Lt(o[0],h,z),ra(y,o[0]),Lt(y,y,z),vq(y,x))Lt(o[0],o[0],u1e);if(ra(y,o[0]),Lt(y,y,z),vq(y,x))return-1;if(Cq(o[0])===f[31]>>7)Cc(o[0],x_,o[0]);return Lt(o[3],o[0],o[1]),0}function g1e(o,f){var h;for(h=0;h<16;++h)o[h]=f[2*h]+(f[2*h+1]<<8);o[15]&=32767}function y1e(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)Lt(h,h,f);for(y=0;y<16;++y)o[y]=h[y]}function vq(o,f){var h=new xo(32),y=new xo(32);return Uh(h,o),Uh(y,f),zq(h,0,y,0)}function zq(o,f,h,y){return b1e(o,f,h,y,32)}function b1e(o,f,h,y,x){var z,C=0;for(z=0;z<x;++z)C|=o[f+z]^h[y+z];return(1&C-1>>>8)-1}function Cq(o){var f=new xo(32);return Uh(f,o),f[0]&1}function wq(o,f,h){var y,x;Ki(o[0],x_),Ki(o[1],Mh),Ki(o[2],Mh),Ki(o[3],x_);for(x=255;x>=0;--x)y=h[x/8|0]>>(x&7)&1,bq(o,f,y),z_(f,o),z_(o,o),bq(o,f,y)}function w_(o,f){var h=[Ve(),Ve(),Ve(),Ve()];Ki(h[0],gq),Ki(h[1],yq),Ki(h[2],Mh),Lt(h[3],gq,yq),wq(o,h,f)}function Ki(o,f){var h;for(h=0;h<16;h++)o[h]=f[h]|0}function v1e(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)Lt(h,h,f);for(y=0;y<16;++y)o[y]=h[y]}function y_(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 Sq(o,f,h){var y,x=~(h-1);for(var z=0;z<16;++z)y=x&(o[z]^f[z]),o[z]^=y,f[z]^=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 zc(o,f,h){for(var y=0;y<16;++y)o[y]=f[y]+h[y]}function Cc(o,f,h){for(var y=0;y<16;++y)o[y]=f[y]-h[y]}function ra(o,f){Lt(o,f,f)}function Lt(o,f,h){var y,x,z=0,C=0,w=0,S=0,E=0,T=0,k=0,O=0,R=0,I=0,A=0,j=0,P=0,F=0,q=0,W=0,ee=0,te=0,le=0,he=0,ye=0,ke=0,me=0,Ae=0,He=0,Le=0,Pe=0,re=0,oe=0,Ke=0,Pt=0,Ce=h[0],De=h[1],Ne=h[2],Ge=h[3],st=h[4],St=h[5],Et=h[6],je=h[7],Fe=h[8],at=h[9],ut=h[10],Bt=h[11],ct=h[12],Ue=h[13],et=h[14],Rt=h[15];y=f[0],z+=y*Ce,C+=y*De,w+=y*Ne,S+=y*Ge,E+=y*st,T+=y*St,k+=y*Et,O+=y*je,R+=y*Fe,I+=y*at,A+=y*ut,j+=y*Bt,P+=y*ct,F+=y*Ue,q+=y*et,W+=y*Rt,y=f[1],C+=y*Ce,w+=y*De,S+=y*Ne,E+=y*Ge,T+=y*st,k+=y*St,O+=y*Et,R+=y*je,I+=y*Fe,A+=y*at,j+=y*ut,P+=y*Bt,F+=y*ct,q+=y*Ue,W+=y*et,ee+=y*Rt,y=f[2],w+=y*Ce,S+=y*De,E+=y*Ne,T+=y*Ge,k+=y*st,O+=y*St,R+=y*Et,I+=y*je,A+=y*Fe,j+=y*at,P+=y*ut,F+=y*Bt,q+=y*ct,W+=y*Ue,ee+=y*et,te+=y*Rt,y=f[3],S+=y*Ce,E+=y*De,T+=y*Ne,k+=y*Ge,O+=y*st,R+=y*St,I+=y*Et,A+=y*je,j+=y*Fe,P+=y*at,F+=y*ut,q+=y*Bt,W+=y*ct,ee+=y*Ue,te+=y*et,le+=y*Rt,y=f[4],E+=y*Ce,T+=y*De,k+=y*Ne,O+=y*Ge,R+=y*st,I+=y*St,A+=y*Et,j+=y*je,P+=y*Fe,F+=y*at,q+=y*ut,W+=y*Bt,ee+=y*ct,te+=y*Ue,le+=y*et,he+=y*Rt,y=f[5],T+=y*Ce,k+=y*De,O+=y*Ne,R+=y*Ge,I+=y*st,A+=y*St,j+=y*Et,P+=y*je,F+=y*Fe,q+=y*at,W+=y*ut,ee+=y*Bt,te+=y*ct,le+=y*Ue,he+=y*et,ye+=y*Rt,y=f[6],k+=y*Ce,O+=y*De,R+=y*Ne,I+=y*Ge,A+=y*st,j+=y*St,P+=y*Et,F+=y*je,q+=y*Fe,W+=y*at,ee+=y*ut,te+=y*Bt,le+=y*ct,he+=y*Ue,ye+=y*et,ke+=y*Rt,y=f[7],O+=y*Ce,R+=y*De,I+=y*Ne,A+=y*Ge,j+=y*st,P+=y*St,F+=y*Et,q+=y*je,W+=y*Fe,ee+=y*at,te+=y*ut,le+=y*Bt,he+=y*ct,ye+=y*Ue,ke+=y*et,me+=y*Rt,y=f[8],R+=y*Ce,I+=y*De,A+=y*Ne,j+=y*Ge,P+=y*st,F+=y*St,q+=y*Et,W+=y*je,ee+=y*Fe,te+=y*at,le+=y*ut,he+=y*Bt,ye+=y*ct,ke+=y*Ue,me+=y*et,Ae+=y*Rt,y=f[9],I+=y*Ce,A+=y*De,j+=y*Ne,P+=y*Ge,F+=y*st,q+=y*St,W+=y*Et,ee+=y*je,te+=y*Fe,le+=y*at,he+=y*ut,ye+=y*Bt,ke+=y*ct,me+=y*Ue,Ae+=y*et,He+=y*Rt,y=f[10],A+=y*Ce,j+=y*De,P+=y*Ne,F+=y*Ge,q+=y*st,W+=y*St,ee+=y*Et,te+=y*je,le+=y*Fe,he+=y*at,ye+=y*ut,ke+=y*Bt,me+=y*ct,Ae+=y*Ue,He+=y*et,Le+=y*Rt,y=f[11],j+=y*Ce,P+=y*De,F+=y*Ne,q+=y*Ge,W+=y*st,ee+=y*St,te+=y*Et,le+=y*je,he+=y*Fe,ye+=y*at,ke+=y*ut,me+=y*Bt,Ae+=y*ct,He+=y*Ue,Le+=y*et,Pe+=y*Rt,y=f[12],P+=y*Ce,F+=y*De,q+=y*Ne,W+=y*Ge,ee+=y*st,te+=y*St,le+=y*Et,he+=y*je,ye+=y*Fe,ke+=y*at,me+=y*ut,Ae+=y*Bt,He+=y*ct,Le+=y*Ue,Pe+=y*et,re+=y*Rt,y=f[13],F+=y*Ce,q+=y*De,W+=y*Ne,ee+=y*Ge,te+=y*st,le+=y*St,he+=y*Et,ye+=y*je,ke+=y*Fe,me+=y*at,Ae+=y*ut,He+=y*Bt,Le+=y*ct,Pe+=y*Ue,re+=y*et,oe+=y*Rt,y=f[14],q+=y*Ce,W+=y*De,ee+=y*Ne,te+=y*Ge,le+=y*st,he+=y*St,ye+=y*Et,ke+=y*je,me+=y*Fe,Ae+=y*at,He+=y*ut,Le+=y*Bt,Pe+=y*ct,re+=y*Ue,oe+=y*et,Ke+=y*Rt,y=f[15],W+=y*Ce,ee+=y*De,te+=y*Ne,le+=y*Ge,he+=y*st,ye+=y*St,ke+=y*Et,me+=y*je,Ae+=y*Fe,He+=y*at,Le+=y*ut,Pe+=y*Bt,re+=y*ct,oe+=y*Ue,Ke+=y*et,Pt+=y*Rt,z+=38*ee,C+=38*te,w+=38*le,S+=38*he,E+=38*ye,T+=38*ke,k+=38*me,O+=38*Ae,R+=38*He,I+=38*Le,A+=38*Pe,j+=38*re,P+=38*oe,F+=38*Ke,q+=38*Pt,x=1,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=T+x+65535,x=Math.floor(y/65536),T=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=j+x+65535,x=Math.floor(y/65536),j=y-x*65536,y=P+x+65535,x=Math.floor(y/65536),P=y-x*65536,y=F+x+65535,x=Math.floor(y/65536),F=y-x*65536,y=q+x+65535,x=Math.floor(y/65536),q=y-x*65536,y=W+x+65535,x=Math.floor(y/65536),W=y-x*65536,z+=x-1+37*(x-1),x=1,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=T+x+65535,x=Math.floor(y/65536),T=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=j+x+65535,x=Math.floor(y/65536),j=y-x*65536,y=P+x+65535,x=Math.floor(y/65536),P=y-x*65536,y=F+x+65535,x=Math.floor(y/65536),F=y-x*65536,y=q+x+65535,x=Math.floor(y/65536),q=y-x*65536,y=W+x+65535,x=Math.floor(y/65536),W=y-x*65536,z+=x-1+37*(x-1),o[0]=z,o[1]=C,o[2]=w,o[3]=S,o[4]=E,o[5]=T,o[6]=k,o[7]=O,o[8]=R,o[9]=I,o[10]=A,o[11]=j,o[12]=P,o[13]=F,o[14]=q,o[15]=W}});var Rq=i(function(BLe,Iq){var Io=Xe();_t();Vo();Mu();Iq.exports=Io.kem=Io.kem||{};var kq=Io.jsbn.BigInteger;Io.kem.rsa={};Io.kem.rsa.create=function(o,f){f=f||{};var h=f.prng||Io.random,y={};return y.encrypt=function(x,z){var C=Math.ceil(x.n.bitLength()/8),w;do w=new kq(Io.util.bytesToHex(h.getBytesSync(C)),16).mod(x.n);while(w.compareTo(kq.ONE)<=0);w=Io.util.hexToBytes(w.toString(16));var S=C-w.length;if(S>0)w=Io.util.fillString(String.fromCharCode(0),S)+w;var E=x.encrypt(w,"NONE"),T=o.generate(w,z);return{encapsulation:E,key:T}},y.decrypt=function(x,z,C){var w=x.decrypt(z,"NONE");return o.generate(w,C)},y};Io.kem.kdf1=function(o,f){Oq(this,o,0,f||o.digestLength)};Io.kem.kdf2=function(o,f){Oq(this,o,1,f||o.digestLength)};function Oq(o,f,h,y){o.generate=function(x,z){var C=new Io.util.ByteBuffer,w=Math.ceil(z/y)+h,S=new Io.util.ByteBuffer;for(var E=h;E<w;++E){S.putInt32(E),f.start(),f.update(x+S.getBytes());var T=f.digest();C.putBytes(T.getBytes(y))}return C.truncate(C.length()-z),C.getBytes()}}});var Pq=i(function(LLe,Aq){var lt=Xe();_t();Aq.exports=lt.log=lt.log||{};lt.log.levels=["none","error","warning","info","debug","verbose","max"];var Gh={},S_=[],Ku=null;lt.log.LEVEL_LOCKED=2;lt.log.NO_LEVEL_CHECK=4;lt.log.INTERPOLATE=8;for(Zo=0;Zo<lt.log.levels.length;++Zo)Vh=lt.log.levels[Zo],Gh[Vh]={index:Zo,name:Vh.toUpperCase()};var Vh,Zo;lt.log.logMessage=function(o){var f=Gh[o.level].index;for(var h=0;h<S_.length;++h){var y=S_[h];if(y.flags&lt.log.NO_LEVEL_CHECK)y.f(o);else{var x=Gh[y.level].index;if(f<=x)y.f(y,o)}}};lt.log.prepareStandard=function(o){if(!("standard"in o))o.standard=Gh[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};Hh=["error","warning","info","debug","verbose"];for(Zo=0;Zo<Hh.length;++Zo)(function(f){lt.log[f]=function(h,y){var x=Array.prototype.slice.call(arguments).slice(2),z={timestamp:new Date,level:f,category:h,message:y,arguments:x};lt.log.logMessage(z)}})(Hh[Zo]);var Hh,Zo;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){S_.push(o)};if(typeof console<"u"&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)E_={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},Sc=function(o,f){lt.log.prepareStandard(f);var h=E_[f.level],y=[f.standard];y=y.concat(f.arguments.slice()),h.apply(console,y)},oa=lt.log.makeLogger(Sc);else Sc=function(f,h){lt.log.prepareStandardFull(h),console.log(h.standardFull)},oa=lt.log.makeLogger(Sc);lt.log.setLevel(oa,"debug"),lt.log.addLogger(oa),Ku=oa}else console={log:function(){}};var oa,E_,Sc;if(Ku!==null&&typeof window<"u"&&window.location){if(wc=new URL(window.location.href).searchParams,wc.has("console.level"))lt.log.setLevel(Ku,wc.get("console.level").slice(-1)[0]);if(wc.has("console.lock")){if(T_=wc.get("console.lock").slice(-1)[0],T_=="true")lt.log.lock(Ku)}}var wc,T_;lt.log.consoleLogger=Ku});var Bq=i(function(NLe,Dq){Dq.exports=Dn();bh();mc();qx();g_()});var jq=i(function(jLe,Nq){var xe=Xe();Mi();yn();Nu();qi();$s();t_();Vo();_t();Ph();var K=xe.asn1,oo=Nq.exports=xe.pkcs7=xe.pkcs7||{};oo.messageFromPem=function(o){var f=xe.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 oo.messageFromAsn1(y)};oo.messageToPem=function(o,f){var h={type:"PKCS7",body:K.toDer(o.toAsn1()).getBytes()};return xe.pem.encode(h,{maxline:f})};oo.messageFromAsn1=function(o){var f={},h=[];if(!K.validate(o,oo.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),z;switch(x){case xe.pki.oids.envelopedData:z=oo.createEnvelopedData();break;case xe.pki.oids.encryptedData:z=oo.createEncryptedData();break;case xe.pki.oids.signedData:z=oo.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+x+" is not (yet) supported.")}return z.fromAsn1(f.content.value[0]),z};oo.createSignedData=function(){var o=null;return o={type:xe.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(y){if(O_(o,y,oo.asn1.signedDataValidator),o.certificates=[],o.crls=[],o.digestAlgorithmIdentifiers=[],o.contentInfo=null,o.signerInfos=[],o.rawCapture.certificates){var x=o.rawCapture.certificates.value;for(var z=0;z<x.length;++z)o.certificates.push(xe.pki.certificateFromAsn1(x[z]))}},toAsn1:function(){if(!o.contentInfo)o.sign();var y=[];for(var x=0;x<o.certificates.length;++x)y.push(xe.pki.certificateToAsn1(o.certificates[x]));var z=[],C=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)C.value[0].value.push(K.create(K.Class.CONTEXT_SPECIFIC,0,!0,y));if(z.length>0)C.value[0].value.push(K.create(K.Class.CONTEXT_SPECIFIC,1,!0,z));return C.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()),C])},addSigner:function(y){var{issuer:x,serialNumber:z}=y;if(y.certificate){var C=y.certificate;if(typeof C==="string")C=xe.pki.certificateFromPem(C);x=C.issuer.attributes,z=C.serialNumber}var w=y.key;if(!w)throw Error("Could not add PKCS#7 signer; no private key specified.");if(typeof w==="string")w=xe.pki.privateKeyFromPem(w);var S=y.digestAlgorithm||xe.pki.oids.sha1;switch(S){case xe.pki.oids.sha1:case xe.pki.oids.sha256:case xe.pki.oids.sha384:case xe.pki.oids.sha512:case xe.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+S)}var E=y.authenticatedAttributes||[];if(E.length>0){var T=!1,k=!1;for(var O=0;O<E.length;++O){var R=E[O];if(!T&&R.type===xe.pki.oids.contentType){if(T=!0,k)break;continue}if(!k&&R.type===xe.pki.oids.messageDigest){if(k=!0,T)break;continue}}if(!T||!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:w,version:1,issuer:x,serialNumber:z,digestAlgorithm:S,signatureAlgorithm:xe.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:E,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(xe.pki.oids.data).getBytes())]),"content"in o){var x;if(o.content instanceof xe.util.ByteBuffer)x=o.content.bytes();else if(typeof o.content==="string")x=xe.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 z=f();h(z)},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(y){if(typeof y==="string")y=xe.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 z=o.signers[x],C=z.digestAlgorithm;if(!(C in y))y[C]=xe.md[xe.pki.oids[C]].create();if(z.authenticatedAttributes.length===0)z.md=y[C];else z.md=xe.md[xe.pki.oids[C]].create()}o.digestAlgorithmIdentifiers=[];for(var C 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(C).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 z=K.derToOid(o.contentInfo.value[0].value),C=K.toDer(x);C.getByte(),K.getBerValueLength(C),C=C.getBytes();for(var w in y)y[w].start().update(C);var S=new Date;for(var E=0;E<o.signers.length;++E){var T=o.signers[E];if(T.authenticatedAttributes.length===0){if(z!==xe.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{T.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<T.authenticatedAttributes.length;++O){var R=T.authenticatedAttributes[O];if(R.type===xe.pki.oids.messageDigest)R.value=y[T.digestAlgorithm].digest();else if(R.type===xe.pki.oids.signingTime){if(!R.value)R.value=S}k.value.push(k_(R)),T.authenticatedAttributesAsn1.value.push(k_(R))}C=K.toDer(k).getBytes(),T.md.start().update(C)}T.signature=T.key.sign(T.md,"RSASSA-PKCS1-V1_5")}o.signerInfos=S1e(o.signers)}};oo.createEncryptedData=function(){var o=null;return o={type:xe.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:xe.pki.oids["aes256-CBC"]},fromAsn1:function(f){O_(o,f,oo.asn1.encryptedDataValidator)},decrypt:function(f){if(f!==void 0)o.encryptedContent.key=f;Lq(o)}},o};oo.createEnvelopedData=function(){var o=null;return o={type:xe.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:xe.pki.oids["aes256-CBC"]},fromAsn1:function(f){var h=O_(o,f,oo.asn1.envelopedDataValidator);o.recipients=z1e(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,C1e(o.recipients)),K.create(K.Class.UNIVERSAL,K.Type.SEQUENCE,!0,E1e(o.encryptedContent))])])])},findRecipient:function(f){var h=f.issuer.attributes;for(var y=0;y<o.recipients.length;++y){var x=o.recipients[y],z=x.issuer;if(x.serialNumber!==f.serialNumber)continue;if(z.length!==h.length)continue;var C=!0;for(var w=0;w<h.length;++w)if(z[w].type!==h[w].type||z[w].value!==h[w].value){C=!1;break}if(C)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 xe.pki.oids.rsaEncryption:case xe.pki.oids.desCBC:var y=h.decrypt(f.encryptedContent.content);o.encryptedContent.key=xe.util.createBuffer(y);break;default:throw Error("Unsupported asymmetric cipher, OID "+f.encryptedContent.algorithm)}Lq(o)},addRecipient:function(f){o.recipients.push({version:0,issuer:f.issuer.attributes,serialNumber:f.serialNumber,encryptedContent:{algorithm:xe.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,z;switch(h){case xe.pki.oids["aes128-CBC"]:y=16,x=16,z=xe.aes.createEncryptionCipher;break;case xe.pki.oids["aes192-CBC"]:y=24,x=16,z=xe.aes.createEncryptionCipher;break;case xe.pki.oids["aes256-CBC"]:y=32,x=16,z=xe.aes.createEncryptionCipher;break;case xe.pki.oids["des-EDE3-CBC"]:y=24,x=8,z=xe.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+h)}if(f===void 0)f=xe.util.createBuffer(xe.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=xe.util.createBuffer(xe.random.getBytes(x));var C=z(f);if(C.start(o.encryptedContent.parameter.copy()),C.update(o.content),!C.finish())throw Error("Symmetric encryption failed.");o.encryptedContent.content=C.output}for(var w=0;w<o.recipients.length;++w){var S=o.recipients[w];if(S.encryptedContent.content!==void 0)continue;switch(S.encryptedContent.algorithm){case xe.pki.oids.rsaEncryption:S.encryptedContent.content=S.encryptedContent.key.encrypt(o.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+S.encryptedContent.algorithm)}}}},o};function x1e(o){var f={},h=[];if(!K.validate(o,oo.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:xe.pki.RDNAttributesAsArray(f.issuer),serialNumber:xe.util.createBuffer(f.serial).toHex(),encryptedContent:{algorithm:K.derToOid(f.encAlgorithm),parameter:f.encParameter?f.encParameter.value:void 0,content:f.encKey}}}function _1e(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,[xe.pki.distinguishedNameToAsn1({attributes:o.issuer}),K.create(K.Class.UNIVERSAL,K.Type.INTEGER,!1,xe.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 z1e(o){var f=[];for(var h=0;h<o.length;++h)f.push(x1e(o[h]));return f}function C1e(o){var f=[];for(var h=0;h<o.length;++h)f.push(_1e(o[h]));return f}function w1e(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,[xe.pki.distinguishedNameToAsn1({attributes:o.issuer}),K.create(K.Class.UNIVERSAL,K.Type.INTEGER,!1,xe.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(k_(x))}f.value.push(h)}return f}function S1e(o){var f=[];for(var h=0;h<o.length;++h)f.push(w1e(o[h]));return f}function k_(o){var f;if(o.type===xe.pki.oids.contentType)f=K.create(K.Class.UNIVERSAL,K.Type.OID,!1,K.oidToDer(o.value).getBytes());else if(o.type===xe.pki.oids.messageDigest)f=K.create(K.Class.UNIVERSAL,K.Type.OCTETSTRING,!1,o.value.bytes());else if(o.type===xe.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 z=Date.parse(x);if(!isNaN(z))x=new Date(z);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 E1e(o){return[K.create(K.Class.UNIVERSAL,K.Type.OID,!1,K.oidToDer(xe.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 O_(o,f,h){var y={},x=[];if(!K.validate(f,h,y,x)){var z=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw z.errors=z,z}var C=K.derToOid(y.contentType);if(C!==xe.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(y.encryptedContent){var w="";if(xe.util.isArray(y.encryptedContent))for(var S=0;S<y.encryptedContent.length;++S){if(y.encryptedContent[S].type!==K.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");w+=y.encryptedContent[S].value}else w=y.encryptedContent;o.encryptedContent={algorithm:K.derToOid(y.encAlgorithm),parameter:xe.util.createBuffer(y.encParameter.value),content:xe.util.createBuffer(w)}}if(y.content){var w="";if(xe.util.isArray(y.content))for(var S=0;S<y.content.length;++S){if(y.content[S].type!==K.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");w+=y.content[S].value}else w=y.content;o.content=xe.util.createBuffer(w)}return o.version=y.version.charCodeAt(0),o.rawCapture=y,y}function Lq(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 xe.pki.oids["aes128-CBC"]:case xe.pki.oids["aes192-CBC"]:case xe.pki.oids["aes256-CBC"]:f=xe.aes.createDecryptionCipher(o.encryptedContent.key);break;case xe.pki.oids.desCBC:case xe.pki.oids["des-EDE3-CBC"]:f=xe.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 qq=i(function(MLe,Mq){var pr=Xe();Mi();dc();bh();mc();_t();var Wh=Mq.exports=pr.ssh=pr.ssh||{};Wh.privateKeyToPutty=function(o,f,h){h=h||"",f=f||"";var y="ssh-rsa",x=f===""?"none":"aes256-cbc",z="PuTTY-User-Key-File-2: "+y+`\r
128
+ `;z+="Encryption: "+x+`\r
129
+ `,z+="Comment: "+h+`\r
130
+ `;var C=pr.util.createBuffer();Ec(C,y),Un(C,o.e),Un(C,o.n);var w=pr.util.encode64(C.bytes(),64),S=Math.floor(w.length/66)+1;z+="Public-Lines: "+S+`\r
131
+ `,z+=w;var E=pr.util.createBuffer();Un(E,o.d),Un(E,o.p),Un(E,o.q),Un(E,o.qInv);var T;if(!f)T=pr.util.encode64(E.bytes(),64);else{var k=E.length()+16-1;k-=k%16;var O=Kh(E.bytes());O.truncate(O.length()-k+E.length()),E.putBuffer(O);var R=pr.util.createBuffer();R.putBuffer(Kh("\x00\x00\x00\x00",f)),R.putBuffer(Kh("\x00\x00\x00\x01",f));var I=pr.aes.createEncryptionCipher(R.truncate(8),"CBC");I.start(pr.util.createBuffer().fillWithByte(0,16)),I.update(E.copy()),I.finish();var A=I.output;A.truncate(16),T=pr.util.encode64(A.bytes(),64)}S=Math.floor(T.length/66)+1,z+=`\r
132
+ Private-Lines: `+S+`\r
133
+ `,z+=T;var j=Kh("putty-private-key-file-mac-key",f),P=pr.util.createBuffer();Ec(P,y),Ec(P,x),Ec(P,h),P.putInt32(C.length()),P.putBuffer(C),P.putInt32(E.length()),P.putBuffer(E);var F=pr.hmac.create();return F.start("sha1",j),F.update(P.bytes()),z+=`\r
134
+ Private-MAC: `+F.digest().toHex()+`\r
135
+ `,z};Wh.publicKeyToOpenSSH=function(o,f){var h="ssh-rsa";f=f||"";var y=pr.util.createBuffer();return Ec(y,h),Un(y,o.e),Un(y,o.n),h+" "+pr.util.encode64(y.bytes())+" "+f};Wh.privateKeyToOpenSSH=function(o,f){if(!f)return pr.pki.privateKeyToPem(o);return pr.pki.encryptRsaPrivateKey(o,f,{legacy:!0,algorithm:"aes128"})};Wh.getPublicKeyFingerprint=function(o,f){f=f||{};var h=f.md||pr.md.md5.create(),y="ssh-rsa",x=pr.util.createBuffer();Ec(x,y),Un(x,o.e),Un(x,o.n),h.start(),h.update(x.getBytes());var z=h.digest();if(f.encoding==="hex"){var C=z.toHex();if(f.delimiter)return C.match(/.{2}/g).join(f.delimiter);return C}else if(f.encoding==="binary")return z.getBytes();else if(f.encoding)throw Error('Unknown encoding "'+f.encoding+'".');return z};function Un(o,f){var h=f.toString(16);if(h[0]>="8")h="00"+h;var y=pr.util.hexToBytes(h);o.putInt32(y.length),o.putBytes(y)}function Ec(o,f){o.putInt32(f.length),o.putString(f)}function Kh(){var o=pr.md.sha1.create(),f=arguments.length;for(var h=0;h<f;++h)o.update(arguments[h]);return o.digest()}});var Uq=i(function(qLe,Fq){Fq.exports=Xe();Mi();uq();yn();dh();Nu();Tq();dc();Rq();Pq();Bq();r_();Ch();$s();Jx();i_();jq();a_();Yx();Fx();Ih();Vo();Vx();qq();f_();_t()});var Wq=i(function(FLe,Kq){var $q=Fs(),$n=Uq(),Vq=[[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]],T1e=[[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 Gq{constructor(o,f){this.keystore=o,this.password=f}static probe(o){let h=new $q(o).read(24);for(let y=0;y<Vq.length;y++){let x=new $q(h),z=Vq[y];if(T1e[y].map((S)=>(x.readInt()&S)>>>0).every((S,E)=>S===z[E]))return!0}return!1}parse(){let o=this.keystore.toString("base64"),f=$n.util.decode64(o),h=$n.asn1.fromDer(f);return $n.pkcs12.pkcs12FromAsn1(h,this.password||"").safeContents.reduce((x,z)=>{if(!Array.isArray(z.safeBags))return x;return x.concat(z.safeBags)},[])}toPem(o){return o.reduce((f,h)=>{let y=h.attributes.friendlyName[0],x=Boolean(h.attributes.localKeyId),z=f[y]||{};if(h.type===$n.pki.oids.certBag){let C=x?"cert":"ca";if(h.cert)z={...z,[C]:$n.pki.certificateToPem(h.cert).replace(/\r\n/g,`
136
+ `)};else if(h.asn1)z={...z,[C]:Hq(h.asn1,"CERTIFICATE").replace(/\r\n/g,`
137
+ `)}}if(h.key)z={...z,key:k1e(h.key).replace(/\r\n/g,`
138
+ `)};else if(h.asn1&&h.hasOwnProperty("key"))z={...z,key:Hq(h.asn1,"PRIVATE KEY").replace(/\r\n/g,`
139
+ `)};return{...f,[y]:z}},{})}}var k1e=(o,f)=>$n.pki.privateKeyInfoToPem($n.pki.wrapRsaPrivateKey($n.pki.privateKeyToAsn1(o))),Hq=(o,f)=>{let h={type:f,body:$n.asn1.toDer(o).getBytes()};return $n.pem.encode(h)};Kq.exports=Gq});var Wu=i(function(ULe,Zq){var Jq=Fs(),O1e=cc();class _o{constructor(o){this.tag=null,this.length=0,this.data=null,this.buffer=null,this.buffer=O1e(o.buffer,o.offset),this.init(o)}init(o){this.tag=o.readByte();let f=o.buffer.readUInt8(o.offset);if(this.length=_o.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 Jq(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()!=_o.tag_Integer)throw Error("DER input, Integer tag error");let f=_o.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!==_o.tag_OctetString&&!this.isConstructed(_o.tag_OctetString))throw Error("DerValue.getOctetString, not an Octet String: "+derValue.tag);let o=new Jq(this.buffer),f=Buffer.from([]);while(o.available()){let h=o.readByte();if(h!==_o.tag_OctetString)throw Error("DER input not an octet string: "+h);let y=_o.getLength(o),x=o.read(y);f=Buffer.concat([f,x])}return f}getDerValue(){return new _o(this.data)}}_o.tag_ObjectId=6;_o.tag_Sequence=48;_o.tag_OctetString=4;_o.tag_Integer=2;Zq.exports=_o});var I_=i(function($Le,Qq){var Yq=Wu();class Xq{constructor(o){let f=o.readByte();if(f!==Yq.tag_ObjectId)throw Error("data isn't an object ID ( tag = "+f+")");let h=Yq.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 z=h;z<=y;z++){x<<=7;let C=this.encoding[z];x|=C&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}}Qq.exports=Xq});var r3=i(function(VLe,t3){var I1e=Fs(),R1e=I_(),R_=Wu();class e3{constructor(o){let f=new R_(new I1e(o)),h=new R_(f.data),y=new R_(f.data);this.alghorithmId=this.createAlghorithmId(h),this.octetString=y.getOctetString()}createAlghorithmId(o){return new R1e(o.data).toString()}getAlgorithm(){return this.alghorithmId}getEncryptedData(){return this.octetString}}t3.exports=e3});var no=i(function(A1e,Tc){var HLe=c("crypto");A1e.linebrk=function(o,f){var h="",y=0;while(y+f<o.length)h+=o.substring(y,y+f)+`
140
+ `,y+=f;return h+o.substring(y,o.length)};A1e.detectEnvironment=function(){if(typeof window<"u"&&window&&!(process&&process.title==="node"))return"browser";return"node"};A1e.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,z=0;x>f;x--,z+=2)y+=o[x-1]*Math.pow(16,z);return y}else return NaN};A1e._={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}};A1e.trimSurroundingText=function(o,f,h){var y=0,x=o.length,z=o.indexOf(f);if(z>=0)y=z+f.length;var C=o.indexOf(h,z);if(C>=0)x=C;return o.substring(y,x)}});var aa=i(function(KLe,a3){var j1e=c("crypto"),M1e=no()._,Oc,q1e=244837814094590,GLe=(q1e&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 F1e(o,f,h,y,x,z){var C=f&16383,w=f>>14;while(--z>=0){var S=this[o]&16383,E=this[o++]>>14,T=w*S+E*C;S=C*S+((T&16383)<<14)+h[y]+x,x=(S>>28)+(T>>14)+w*E,h[y++]=S&268435455}return x}pe.prototype.am=F1e;Oc=28;pe.prototype.DB=Oc;pe.prototype.DM=(1<<Oc)-1;pe.prototype.DV=1<<Oc;var P_=52;pe.prototype.FV=Math.pow(2,P_);pe.prototype.F1=P_-Oc;pe.prototype.F2=2*Oc-P_;var U1e="0123456789abcdefghijklmnopqrstuvwxyz",Jh=[],Rc,Yo;Rc=48;for(Yo=0;Yo<=9;++Yo)Jh[Rc++]=Yo;Rc=97;for(Yo=10;Yo<36;++Yo)Jh[Rc++]=Yo;Rc=65;for(Yo=10;Yo<36;++Yo)Jh[Rc++]=Yo;function A_(o){return U1e.charAt(o)}function o3(o,f){var h=Jh[o.charCodeAt(f)];return h==null?-1:h}function $1e(o){for(var f=this.t-1;f>=0;--f)o[f]=this[f];o.t=this.t,o.s=this.s}function V1e(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 H1e(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,z=!1,C=0;while(--x>=0){var w=y==8?o[x]&255:o3(o,x);if(w<0){if(o.charAt(x)=="-")z=!0;continue}if(z=!1,C===0)this[this.t++]=w;else if(C+y>this.DB)this[this.t-1]|=(w&(1<<this.DB-C)-1)<<C,this[this.t++]=w>>this.DB-C;else this[this.t-1]|=w<<C;if(C+=y,C>=this.DB)C-=this.DB}if(!h&&y==8&&(o[0]&128)!=0){if(this.s=-1,C>0)this[this.t-1]|=(1<<this.DB-C)-1<<C}if(this.clamp(),z)pe.ZERO.subTo(this,this)}function G1e(o,f){this.fromString(o,256,f)}function K1e(o){this.fromString(o,256,!0)}function W1e(){var o=this.s&this.DM;while(this.t>0&&this[this.t-1]==o)--this.t}function J1e(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="",C=this.t,w=this.DB-C*this.DB%f;if(C-- >0){if(w<this.DB&&(y=this[C]>>w)>0)x=!0,z=A_(y);while(C>=0){if(w<f)y=(this[C]&(1<<w)-1)<<f-w,y|=this[--C]>>(w+=this.DB-f);else if(y=this[C]>>(w-=f)&h,w<=0)w+=this.DB,--C;if(y>0)x=!0;if(x)z+=A_(y)}}return x?z:"0"}function Z1e(){var o=ht();return pe.ZERO.subTo(this,o),o}function Y1e(){return this.s<0?this.negate():this}function X1e(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 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 Q1e(){if(this.t<=0)return 0;return this.DB*(this.t-1)+Zh(this[this.t-1]^this.s&this.DM)}function eCe(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 tCe(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 rCe(o,f){var h=o%this.DB,y=this.DB-h,x=(1<<y)-1,z=Math.floor(o/this.DB),C=this.s<<h&this.DM,w;for(w=this.t-1;w>=0;--w)f[w+z+1]=this[w]>>y|C,C=(this[w]&x)<<h;for(w=z-1;w>=0;--w)f[w]=0;f[z]=C,f.t=this.t+z+1,f.s=this.s,f.clamp()}function oCe(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,z=(1<<y)-1;f[0]=this[h]>>y;for(var C=h+1;C<this.t;++C)f[C-h-1]|=(this[C]&z)<<x,f[C-h]=this[C]>>y;if(y>0)f[this.t-h-1]|=(this.s&z)<<x;f.t=this.t-h,f.clamp()}function nCe(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 iCe(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 sCe(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 aCe(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 z=ht(),C=this.s,w=o.s,S=this.DB-Zh(y[y.t-1]);if(S>0)y.lShiftTo(S,z),x.lShiftTo(S,h);else y.copyTo(z),x.copyTo(h);var E=z.t,T=z[E-1];if(T===0)return;var k=T*(1<<this.F1)+(E>1?z[E-2]>>this.F2:0),O=this.FV/k,R=(1<<this.F1)/k,I=1<<this.F2,A=h.t,j=A-E,P=f==null?ht():f;if(z.dlShiftTo(j,P),h.compareTo(P)>=0)h[h.t++]=1,h.subTo(P,h);pe.ONE.dlShiftTo(E,P),P.subTo(z,z);while(z.t<E)z[z.t++]=0;while(--j>=0){var F=h[--A]==T?this.DM:Math.floor(h[A]*O+(h[A-1]+I)*R);if((h[A]+=z.am(0,F,h,j,0,E))<F){z.dlShiftTo(j,P),h.subTo(P,h);while(h[A]<--F)h.subTo(P,h)}}if(f!=null){if(h.drShiftTo(E,f),C!=w)pe.ZERO.subTo(f,f)}if(h.t=E,h.clamp(),S>0)h.rShiftTo(S,h);if(C<0)pe.ZERO.subTo(h,h)}function cCe(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 na(o){this.m=o}function lCe(o){if(o.s<0||o.compareTo(this.m)>=0)return o.mod(this.m);else return o}function uCe(o){return o}function dCe(o){o.divRemTo(this.m,null,o)}function pCe(o,f,h){o.multiplyTo(f,h),this.reduce(h)}function fCe(o,f){o.squareTo(f),this.reduce(f)}na.prototype.convert=lCe;na.prototype.revert=uCe;na.prototype.reduce=dCe;na.prototype.mulTo=pCe;na.prototype.sqrTo=fCe;function hCe(){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 ia(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 mCe(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 gCe(o){var f=ht();return o.copyTo(f),this.reduce(f),f}function yCe(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 bCe(o,f){o.squareTo(f),this.reduce(f)}function vCe(o,f,h){o.multiplyTo(f,h),this.reduce(h)}ia.prototype.convert=mCe;ia.prototype.revert=gCe;ia.prototype.reduce=yCe;ia.prototype.mulTo=vCe;ia.prototype.sqrTo=bCe;function xCe(){return(this.t>0?this[0]&1:this.s)===0}function _Ce(o,f){if(o>4294967295||o<1)return pe.ONE;var h=ht(),y=ht(),x=f.convert(this),z=Zh(o)-1;x.copyTo(h);while(--z>=0)if(f.sqrTo(h,y),(o&1<<z)>0)f.mulTo(y,x,h);else{var C=h;h=y,y=C}return f.revert(h)}function zCe(o,f){var h;if(o<256||f.isEven())h=new na(f);else h=new ia(f);return this.exp(o,h)}function CCe(){var o=ht();return this.copyTo(o),o}function wCe(){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 SCe(){return this.t==0?this.s:this[0]<<24>>24}function ECe(){return this.t==0?this.s:this[0]<<16>>16}function TCe(o){return Math.floor(Math.LN2*this.DB/Math.log(o))}function kCe(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function OCe(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(),z=ht(),C="";this.divRemTo(y,x,z);while(x.signum()>0)C=(h+z.intValue()).toString(o).substr(1)+C,x.divRemTo(y,x,z);return z.intValue().toString(o)+C}function ICe(o,f){if(this.fromInt(0),f==null)f=10;var h=this.chunkSize(f),y=Math.pow(f,h),x=!1,z=0,C=0;for(var w=0;w<o.length;++w){var S=o3(o,w);if(S<0){if(o.charAt(w)=="-"&&this.signum()===0)x=!0;continue}if(C=f*C+S,++z>=h)this.dMultiply(y),this.dAddOffset(C,0),z=0,C=0}if(z>0)this.dMultiply(Math.pow(f,z)),this.dAddOffset(C,0);if(x)pe.ZERO.subTo(this,this)}function RCe(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),D_,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=j1e.randomBytes((o>>3)+1),y=o&7;if(y>0)h[0]&=(1<<y)-1;else h[0]=0;this.fromByteArray(h)}}function ACe(){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 PCe(o){var f=Buffer.from(this.toByteArray());if(o===!0&&f[0]===0)f=f.slice(1);else if(M1e.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 DCe(o){return this.compareTo(o)==0}function BCe(o){return this.compareTo(o)<0?this:o}function LCe(o){return this.compareTo(o)>0?this:o}function NCe(o,f,h){var y,x,z=Math.min(o.t,this.t);for(y=0;y<z;++y)h[y]=f(this[y],o[y]);if(o.t<this.t){x=o.s&this.DM;for(y=z;y<this.t;++y)h[y]=f(this[y],x);h.t=this.t}else{x=this.s&this.DM;for(y=z;y<o.t;++y)h[y]=f(x,o[y]);h.t=o.t}h.s=f(this.s,o.s),h.clamp()}function jCe(o,f){return o&f}function MCe(o){var f=ht();return this.bitwiseTo(o,jCe,f),f}function D_(o,f){return o|f}function qCe(o){var f=ht();return this.bitwiseTo(o,D_,f),f}function n3(o,f){return o^f}function FCe(o){var f=ht();return this.bitwiseTo(o,n3,f),f}function i3(o,f){return o&~f}function UCe(o){var f=ht();return this.bitwiseTo(o,i3,f),f}function $Ce(){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 VCe(o){var f=ht();if(o<0)this.rShiftTo(-o,f);else this.lShiftTo(o,f);return f}function HCe(o){var f=ht();if(o<0)this.lShiftTo(-o,f);else this.rShiftTo(o,f);return f}function GCe(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 KCe(){for(var o=0;o<this.t;++o)if(this[o]!=0)return o*this.DB+GCe(this[o]);if(this.s<0)return this.t*this.DB;return-1}function WCe(o){var f=0;while(o!=0)o&=o-1,++f;return f}function JCe(){var o=0,f=this.s&this.DM;for(var h=0;h<this.t;++h)o+=WCe(this[h]^f);return o}function ZCe(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 YCe(o,f){var h=pe.ONE.shiftLeft(o);return this.bitwiseTo(h,f,h),h}function XCe(o){return this.changeBit(o,D_)}function QCe(o){return this.changeBit(o,i3)}function ewe(o){return this.changeBit(o,n3)}function twe(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 rwe(o){var f=ht();return this.addTo(o,f),f}function owe(o){var f=ht();return this.subTo(o,f),f}function nwe(o){var f=ht();return this.multiplyTo(o,f),f}function iwe(){var o=ht();return this.squareTo(o),o}function swe(o){var f=ht();return this.divRemTo(o,f,null),f}function awe(o){var f=ht();return this.divRemTo(o,null,f),f}function cwe(o){var f=ht(),h=ht();return this.divRemTo(o,f,h),[f,h]}function lwe(o){this[this.t]=this.am(0,o-1,this,0,0,this.t),++this.t,this.clamp()}function uwe(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 Ju(){}function s3(o){return o}function dwe(o,f,h){o.multiplyTo(f,h)}function pwe(o,f){o.squareTo(f)}Ju.prototype.convert=s3;Ju.prototype.revert=s3;Ju.prototype.mulTo=dwe;Ju.prototype.sqrTo=pwe;function fwe(o){return this.exp(o,new Ju)}function hwe(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 mwe(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 Ac(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 gwe(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 ywe(o){return o}function bwe(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 vwe(o,f){o.squareTo(f),this.reduce(f)}function xwe(o,f,h){o.multiplyTo(f,h),this.reduce(h)}Ac.prototype.convert=gwe;Ac.prototype.revert=ywe;Ac.prototype.reduce=bwe;Ac.prototype.mulTo=xwe;Ac.prototype.sqrTo=vwe;function _we(o,f){var h=o.bitLength(),y,x=Wi(1),z;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)z=new na(f);else if(f.isEven())z=new Ac(f);else z=new ia(f);var C=[],w=3,S=y-1,E=(1<<y)-1;if(C[1]=z.convert(this),y>1){var T=ht();z.sqrTo(C[1],T);while(w<=E)C[w]=ht(),z.mulTo(T,C[w-2],C[w]),w+=2}var k=o.t-1,O,R=!0,I=ht(),A;h=Zh(o[k])-1;while(k>=0){if(h>=S)O=o[k]>>h-S&E;else if(O=(o[k]&(1<<h+1)-1)<<S-h,k>0)O|=o[k-1]>>this.DB+h-S;w=y;while((O&1)===0)O>>=1,--w;if((h-=w)<0)h+=this.DB,--k;if(R)C[O].copyTo(x),R=!1;else{while(w>1)z.sqrTo(x,I),z.sqrTo(I,x),w-=2;if(w>0)z.sqrTo(x,I);else A=x,x=I,I=A;z.mulTo(I,C[O],x)}while(k>=0&&(o[k]&1<<h)===0)if(z.sqrTo(x,I),A=x,x=I,I=A,--h<0)h=this.DB-1,--k}return z.revert(x)}function zwe(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(),z=h.getLowestSetBit();if(z<0)return f;if(x<z)z=x;if(z>0)f.rShiftTo(z,f),h.rShiftTo(z,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(z>0)h.lShiftTo(z,h);return h}function Cwe(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 wwe(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),z=Wi(0),C=Wi(0),w=Wi(1);while(h.signum()!=0){while(h.isEven()){if(h.rShiftTo(1,h),f){if(!x.isEven()||!z.isEven())x.addTo(this,x),z.subTo(o,z);x.rShiftTo(1,x)}else if(!z.isEven())z.subTo(o,z);z.rShiftTo(1,z)}while(y.isEven()){if(y.rShiftTo(1,y),f){if(!C.isEven()||!w.isEven())C.addTo(this,C),w.subTo(o,w);C.rShiftTo(1,C)}else if(!w.isEven())w.subTo(o,w);w.rShiftTo(1,w)}if(h.compareTo(y)>=0){if(h.subTo(y,h),f)x.subTo(C,x);z.subTo(w,z)}else{if(y.subTo(h,y),f)C.subTo(x,C);w.subTo(z,w)}}if(y.compareTo(pe.ONE)!=0)return pe.ZERO;if(w.compareTo(o)>=0)return w.subtract(o);if(w.signum()<0)w.addTo(o,w);else return w;if(w.signum()<0)return w.add(o);else return w}var io=[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],Swe=67108864/io[io.length-1];function Ewe(o){var f,h=this.abs();if(h.t==1&&h[0]<=io[io.length-1]){for(f=0;f<io.length;++f)if(h[0]==io[f])return!0;return!1}if(h.isEven())return!1;f=1;while(f<io.length){var y=io[f],x=f+1;while(x<io.length&&y<Swe)y*=io[x++];y=h.modInt(y);while(f<x)if(y%io[f++]===0)return!1}return h.millerRabin(o)}function Twe(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>io.length)o=io.length;var x=ht();for(var z=0;z<o;++z){x.fromInt(io[Math.floor(Math.random()*io.length)]);var C=x.modPow(y,this);if(C.compareTo(pe.ONE)!=0&&C.compareTo(f)!=0){var w=1;while(w++<h&&C.compareTo(f)!=0)if(C=C.modPowInt(2,this),C.compareTo(pe.ONE)===0)return!1;if(C.compareTo(f)!=0)return!1}}return!0}pe.prototype.copyTo=$1e;pe.prototype.fromInt=V1e;pe.prototype.fromString=H1e;pe.prototype.fromByteArray=G1e;pe.prototype.fromBuffer=K1e;pe.prototype.clamp=W1e;pe.prototype.dlShiftTo=eCe;pe.prototype.drShiftTo=tCe;pe.prototype.lShiftTo=rCe;pe.prototype.rShiftTo=oCe;pe.prototype.subTo=nCe;pe.prototype.multiplyTo=iCe;pe.prototype.squareTo=sCe;pe.prototype.divRemTo=aCe;pe.prototype.invDigit=hCe;pe.prototype.isEven=xCe;pe.prototype.exp=_Ce;pe.prototype.chunkSize=TCe;pe.prototype.toRadix=OCe;pe.prototype.fromRadix=ICe;pe.prototype.fromNumber=RCe;pe.prototype.bitwiseTo=NCe;pe.prototype.changeBit=YCe;pe.prototype.addTo=twe;pe.prototype.dMultiply=lwe;pe.prototype.dAddOffset=uwe;pe.prototype.multiplyLowerTo=hwe;pe.prototype.multiplyUpperTo=mwe;pe.prototype.modInt=Cwe;pe.prototype.millerRabin=Twe;pe.prototype.toString=J1e;pe.prototype.negate=Z1e;pe.prototype.abs=Y1e;pe.prototype.compareTo=X1e;pe.prototype.bitLength=Q1e;pe.prototype.mod=cCe;pe.prototype.modPowInt=zCe;pe.prototype.clone=CCe;pe.prototype.intValue=wCe;pe.prototype.byteValue=SCe;pe.prototype.shortValue=ECe;pe.prototype.signum=kCe;pe.prototype.toByteArray=ACe;pe.prototype.toBuffer=PCe;pe.prototype.equals=DCe;pe.prototype.min=BCe;pe.prototype.max=LCe;pe.prototype.and=MCe;pe.prototype.or=qCe;pe.prototype.xor=FCe;pe.prototype.andNot=UCe;pe.prototype.not=$Ce;pe.prototype.shiftLeft=VCe;pe.prototype.shiftRight=HCe;pe.prototype.getLowestSetBit=KCe;pe.prototype.bitCount=JCe;pe.prototype.testBit=ZCe;pe.prototype.setBit=XCe;pe.prototype.clearBit=QCe;pe.prototype.flipBit=ewe;pe.prototype.add=rwe;pe.prototype.subtract=owe;pe.prototype.multiply=nwe;pe.prototype.divide=swe;pe.prototype.remainder=awe;pe.prototype.divideAndRemainder=cwe;pe.prototype.modPow=_we;pe.prototype.modInverse=wwe;pe.prototype.pow=fwe;pe.prototype.gcd=zwe;pe.prototype.isProbablePrime=Ewe;pe.int2char=A_;pe.ZERO=Wi(0);pe.ONE=Wi(1);pe.prototype.square=iwe;a3.exports=pe});var d3=i(function(WLe,B_){var c3=aa(),Pc=c("crypto"),Yh=c("constants"),kwe={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")},l3={ripemd160:"rmd160"},u3="sha256";B_.exports={isEncryption:!0,isSignature:!0};B_.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==Yh.RSA_NO_PADDING)return this.key.encryptedDataLength;return this.key.encryptedDataLength-11},h.prototype.encPad=function(y,x){x=x||{};var z;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==Yh.RSA_NO_PADDING)return z=Buffer.alloc(this.key.maxMessageLength-y.length),z.fill(0),Buffer.concat([z,y]);if(x.type===1)return z=Buffer.alloc(this.key.encryptedDataLength-y.length-1),z.fill(255,0,z.length-1),z[0]=1,z[z.length-1]=0,Buffer.concat([z,y]);else{z=Buffer.alloc(this.key.encryptedDataLength-y.length),z[0]=0,z[1]=2;var C=Pc.randomBytes(z.length-3);for(var w=0;w<C.length;w++){var S=C[w];while(S===0)S=Pc.randomBytes(1)[0];z[w+2]=S}return z[z.length-1]=0,Buffer.concat([z,y])}},h.prototype.encUnPad=function(y,x){x=x||{};var z=0;if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==Yh.RSA_NO_PADDING){var C;if(typeof y.lastIndexOf=="function")C=y.slice(y.lastIndexOf("\x00")+1,y.length);else C=y.slice(String.prototype.lastIndexOf.call(y,"\x00")+1,y.length);return C}if(y.length<4)return null;if(x.type===1){if(y[0]!==0||y[1]!==1)return null;z=3;while(y[z]!==0)if(y[z]!=255||++z>=y.length)return null}else{if(y[0]!==0||y[1]!==2)return null;z=3;while(y[z]!==0)if(++z>=y.length)return null}return y.slice(z+1,y.length)},h.prototype.sign=function(y){var x=this.options.signingSchemeOptions.hash||u3;if(this.options.environment==="browser"){x=l3[x]||x;var z=Pc.createHash(x);z.update(y);var C=this.pkcs1pad(z.digest(),x),w=this.key.$doPrivate(new c3(C)).toBuffer(this.key.encryptedDataLength);return w}else{var S=Pc.createSign("RSA-"+x.toUpperCase());return S.update(y),S.sign(this.options.rsaUtils.exportKey("private"))}},h.prototype.verify=function(y,x,z){if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==Yh.RSA_NO_PADDING)return!1;var C=this.options.signingSchemeOptions.hash||u3;if(this.options.environment==="browser"){if(C=l3[C]||C,z)x=Buffer.from(x,z);var w=Pc.createHash(C);w.update(y);var S=this.pkcs1pad(w.digest(),C),E=this.key.$doPublic(new c3(x));return E.toBuffer().toString("hex")==S.toString("hex")}else{var T=Pc.createVerify("RSA-"+C.toUpperCase());return T.update(y),T.verify(this.options.rsaUtils.exportKey("public"),x,z)}},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 z=kwe[x];if(!z)throw Error("Unsupported hash algorithm");var C=Buffer.concat([z,y]);if(C.length+10>this.key.encryptedDataLength)throw Error("Key is too short for signing algorithm ("+x+")");var w=Buffer.alloc(this.key.encryptedDataLength-C.length-1);w.fill(255,0,w.length-1),w[0]=1,w[w.length-1]=0;var S=Buffer.concat([w,C]);return S},new h(o,f)}});var p3=i(function(ZLe,vn){var JLe=aa(),Xh=c("crypto");vn.exports={isEncryption:!0,isSignature:!1};vn.exports.digestLength={md4:16,md5:16,ripemd160:20,rmd160:20,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64};var Qh="sha1";vn.exports.eme_oaep_mgf1=function(o,f,h){h=h||Qh;var y=vn.exports.digestLength[h],x=Math.ceil(f/y),z=Buffer.alloc(y*x),C=Buffer.alloc(4);for(var w=0;w<x;++w){var S=Xh.createHash(h);S.update(o),C.writeUInt32BE(w,0),S.update(C),S.digest().copy(z,w*y)}return z.slice(0,f)};vn.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*vn.exports.digestLength[this.options.encryptionSchemeOptions.hash||Qh]-2},h.prototype.encPad=function(y){var x=this.options.encryptionSchemeOptions.hash||Qh,z=this.options.encryptionSchemeOptions.mgf||vn.exports.eme_oaep_mgf1,C=this.options.encryptionSchemeOptions.label||Buffer.alloc(0),w=this.key.encryptedDataLength,S=vn.exports.digestLength[x];if(y.length>w-2*S-2)throw Error("Message is too long to encode into an encoded message with a length of "+w+" bytes, increaseemLen to fix this error (minimum value for given parameters and options: "+(w-2*S-2)+")");var E=Xh.createHash(x);E.update(C),E=E.digest();var T=Buffer.alloc(w-y.length-2*S-1);T.fill(0),T[T.length-1]=1;var k=Buffer.concat([E,T,y]),O=Xh.randomBytes(S),R=z(O,k.length,x);for(var I=0;I<k.length;I++)k[I]^=R[I];R=z(k,S,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||Qh,z=this.options.encryptionSchemeOptions.mgf||vn.exports.eme_oaep_mgf1,C=this.options.encryptionSchemeOptions.label||Buffer.alloc(0),w=vn.exports.digestLength[x];if(y.length<2*w+2)throw Error("Error decoding message, the supplied message is not long enough to be a valid OAEP encoded message");var S=y.slice(1,w+1),E=y.slice(1+w),T=z(E,w,x);for(var k=0;k<S.length;k++)S[k]^=T[k];T=z(S,E.length,x);for(k=0;k<E.length;k++)E[k]^=T[k];var O=Xh.createHash(x);O.update(C),O=O.digest();var R=E.slice(0,w);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=w;while(E[k++]===0&&k<E.length);if(E[k-1]!=1)throw Error("Error decoding message, there is no padding message separator byte");return E.slice(k)},new h(o,f)}});var m3=i(function(YLe,L_){var f3=aa(),Zu=c("crypto");L_.exports={isEncryption:!1,isSignature:!0};var em="sha1",h3=20;L_.exports.makeScheme=function(o,f){var h=ca().pkcs1_oaep;function y(x,z){this.key=x,this.options=z}return y.prototype.sign=function(x){var z=Zu.createHash(this.options.signingSchemeOptions.hash||em);z.update(x);var C=this.emsa_pss_encode(z.digest(),this.key.keySize-1);return this.key.$doPrivate(new f3(C)).toBuffer(this.key.encryptedDataLength)},y.prototype.verify=function(x,z,C){if(C)z=Buffer.from(z,C);z=new f3(z);var w=Math.ceil((this.key.keySize-1)/8),S=this.key.$doPublic(z).toBuffer(w),E=Zu.createHash(this.options.signingSchemeOptions.hash||em);return E.update(x),this.emsa_pss_verify(E.digest(),S,this.key.keySize-1)},y.prototype.emsa_pss_encode=function(x,z){var C=this.options.signingSchemeOptions.hash||em,w=this.options.signingSchemeOptions.mgf||h.eme_oaep_mgf1,S=this.options.signingSchemeOptions.saltLength||h3,E=h.digestLength[C],T=Math.ceil(z/8);if(T<E+S+2)throw Error("Output length passed to emBits("+z+") is too small for the options specified("+C+", "+S+"). To fix this issue increase the value of emBits. (minimum size: "+(8*E+8*S+9)+")");var k=Zu.randomBytes(S),O=Buffer.alloc(8+E+S);O.fill(0,0,8),x.copy(O,8),k.copy(O,8+x.length);var R=Zu.createHash(C);R.update(O),R=R.digest();var I=Buffer.alloc(T-k.length-E-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 j=w(R,A.length,C),P=Buffer.alloc(A.length);for(var F=0;F<j.length;F++)P[F]=A[F]^j[F];var q=8*T-z,W=255^255>>8-q<<8-q;P[0]=P[0]&W;var ee=Buffer.alloc(P.length+R.length+1);return P.copy(ee,0),R.copy(ee,P.length),ee[ee.length-1]=188,ee},y.prototype.emsa_pss_verify=function(x,z,C){var w=this.options.signingSchemeOptions.hash||em,S=this.options.signingSchemeOptions.mgf||h.eme_oaep_mgf1,E=this.options.signingSchemeOptions.saltLength||h3,T=h.digestLength[w],k=Math.ceil(C/8);if(k<T+E+2||z[z.length-1]!=188)return!1;var O=Buffer.alloc(k-T-1);z.copy(O,0,0,k-T-1);var R=0;for(var I=0,A=8*k-C;I<A;I++)R|=1<<7-I;if((O[0]&R)!==0)return!1;var j=z.slice(k-T-1,k-1),P=S(j,O.length,w);for(I=0;I<O.length;I++)O[I]^=P[I];A=8*k-C,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 F=O.slice(O.length-E),q=Buffer.alloc(8+T+E);q.fill(0,0,8),x.copy(q,8),F.copy(q,8+x.length);var W=Zu.createHash(w);return W.update(q),W=W.digest(),j.toString("hex")===W.toString("hex")},new y(o,f)}});var ca=i(function(XLe,Dc){Dc.exports={pkcs1:d3(),pkcs1_oaep:p3(),pss:m3(),isEncryption:function(o){return Dc.exports[o]&&Dc.exports[o].isEncryption},isSignature:function(o){return Dc.exports[o]&&Dc.exports[o].isSignature}}});var j_=i(function(QLe,g3){var N_=aa(),Owe=ca();g3.exports=function(o,f){var h=Owe.pkcs1.makeScheme(o,f);return{encrypt:function(y,x){var z,C;if(x)z=new N_(h.encPad(y,{type:1})),C=o.$doPrivate(z);else z=new N_(o.encryptionScheme.encPad(y)),C=o.$doPublic(z);return C.toBuffer(o.encryptedDataLength)},decrypt:function(y,x){var z,C=new N_(y);if(x)return z=o.$doPublic(C),h.encUnPad(z.toBuffer(o.encryptedDataLength),{type:1});else return z=o.$doPrivate(C),o.encryptionScheme.encUnPad(z.toBuffer(o.encryptedDataLength))}}}});var b3=i(function(eNe,y3){var tm=c("crypto"),Ji=c("constants"),Iwe=ca();y3.exports=function(o,f){var h=Iwe.pkcs1.makeScheme(o,f);return{encrypt:function(y,x){var z;if(x){if(z=Ji.RSA_PKCS1_PADDING,f.encryptionSchemeOptions&&f.encryptionSchemeOptions.padding)z=f.encryptionSchemeOptions.padding;return tm.privateEncrypt({key:f.rsaUtils.exportKey("private"),padding:z},y)}else{if(z=Ji.RSA_PKCS1_OAEP_PADDING,f.encryptionScheme==="pkcs1")z=Ji.RSA_PKCS1_PADDING;if(f.encryptionSchemeOptions&&f.encryptionSchemeOptions.padding)z=f.encryptionSchemeOptions.padding;var C=y;if(z===Ji.RSA_NO_PADDING)C=h.pkcs0pad(y);return tm.publicEncrypt({key:f.rsaUtils.exportKey("public"),padding:z},C)}},decrypt:function(y,x){var z;if(x){if(z=Ji.RSA_PKCS1_PADDING,f.encryptionSchemeOptions&&f.encryptionSchemeOptions.padding)z=f.encryptionSchemeOptions.padding;return tm.publicDecrypt({key:f.rsaUtils.exportKey("public"),padding:z},y)}else{if(z=Ji.RSA_PKCS1_OAEP_PADDING,f.encryptionScheme==="pkcs1")z=Ji.RSA_PKCS1_PADDING;if(f.encryptionSchemeOptions&&f.encryptionSchemeOptions.padding)z=f.encryptionSchemeOptions.padding;var C=tm.privateDecrypt({key:f.rsaUtils.exportKey("private"),padding:z},y);if(z===Ji.RSA_NO_PADDING)return h.pkcs0unpad(C);return C}}}}});var _3=i(function(tNe,x3){var v3=c("crypto"),Bc=c("constants"),Rwe=ca();x3.exports=function(o,f){var h=j_()(o,f),y=Rwe.pkcs1.makeScheme(o,f);return{encrypt:function(x,z){if(z)return h.encrypt(x,z);var C=Bc.RSA_PKCS1_OAEP_PADDING;if(f.encryptionScheme==="pkcs1")C=Bc.RSA_PKCS1_PADDING;if(f.encryptionSchemeOptions&&f.encryptionSchemeOptions.padding)C=f.encryptionSchemeOptions.padding;var w=x;if(C===Bc.RSA_NO_PADDING)w=y.pkcs0pad(x);return v3.publicEncrypt({key:f.rsaUtils.exportKey("public"),padding:C},w)},decrypt:function(x,z){if(z)return h.decrypt(x,z);var C=Bc.RSA_PKCS1_OAEP_PADDING;if(f.encryptionScheme==="pkcs1")C=Bc.RSA_PKCS1_PADDING;if(f.encryptionSchemeOptions&&f.encryptionSchemeOptions.padding)C=f.encryptionSchemeOptions.padding;var w=v3.privateDecrypt({key:f.rsaUtils.exportKey("private"),padding:C},x);if(C===Bc.RSA_NO_PADDING)return y.pkcs0unpad(w);return w}}}});var C3=i(function(rNe,z3){var rm=c("crypto");z3.exports={getEngine:function(o,f){var h=j_();if(f.environment==="node"){if(typeof rm.publicEncrypt==="function"&&typeof rm.privateDecrypt==="function")if(typeof rm.privateEncrypt==="function"&&typeof rm.publicDecrypt==="function")h=b3();else h=_3()}return h(o,f)}}});var T3=i(function(Pwe,E3){var om=no()._,oNe=c("crypto"),br=aa(),w3=no(),S3=ca(),Awe=C3();Pwe.BigInteger=br;Pwe.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=S3[f.signingScheme],y=S3[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=Awe.getEngine(this,f)},o.prototype.generate=function(f,h){var y=f>>1;this.e=parseInt(h,16);var x=new br(h,16);while(!0){while(!0)if(this.p=new br(f-y,1),this.p.subtract(br.ONE).gcd(x).compareTo(br.ONE)===0&&this.p.isProbablePrime(10))break;while(!0)if(this.q=new br(y,1),this.q.subtract(br.ONE).gcd(x).compareTo(br.ONE)===0&&this.q.isProbablePrime(10))break;if(this.p.compareTo(this.q)<=0){var z=this.p;this.p=this.q,this.q=z}var C=this.p.subtract(br.ONE),w=this.q.subtract(br.ONE),S=C.multiply(w);if(S.gcd(x).compareTo(br.ONE)===0){if(this.n=this.p.multiply(this.q),this.n.bitLength()<f)continue;this.d=x.modInverse(S),this.dmp1=this.d.mod(C),this.dmq1=this.d.mod(w),this.coeff=this.q.modInverse(this.p);break}}this.$$recalculateCache()},o.prototype.setPrivate=function(f,h,y,x,z,C,w,S){if(f&&h&&y&&f.length>0&&(om.isNumber(h)||h.length>0)&&y.length>0){if(this.n=new br(f),this.e=om.isNumber(h)?h:w3.get32IntFromBuffer(h,0),this.d=new br(y),x&&z&&C&&w&&S)this.p=new br(x),this.q=new br(z),this.dmp1=new br(C),this.dmq1=new br(w),this.coeff=new br(S);this.$$recalculateCache()}else throw Error("Invalid RSA private key")},o.prototype.setPublic=function(f,h){if(f&&h&&f.length>0&&(om.isNumber(h)||h.length>0))this.n=new br(f),this.e=om.isNumber(h)?h:w3.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=[],z=f.length,C=Math.ceil(z/this.maxMessageLength)||1,w=Math.ceil(z/C||1);if(C==1)y.push(f);else for(var S=0;S<C;S++)y.push(f.slice(S*w,(S+1)*w));for(var E=0;E<y.length;E++)x.push(this.encryptEngine.encrypt(y[E],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,z=0,C=f.length/this.encryptedDataLength;for(var w=0;w<C;w++)x=w*this.encryptedDataLength,z=x+this.encryptedDataLength,y.push(this.encryptEngine.decrypt(f.slice(x,Math.min(z,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 nm=i(function(nNe,k3){k3.exports={newInvalidAsn1Error:function(o){var f=Error();return f.name="InvalidAsn1Error",f.message=o||"",f}}});var im=i(function(iNe,O3){O3.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 M_=i(function(sNe,I3){var sm=c("buffer"),Lc=sm.Buffer,Xo={},Qo;for(Qo in sm){if(!sm.hasOwnProperty(Qo))continue;if(Qo==="SlowBuffer"||Qo==="Buffer")continue;Xo[Qo]=sm[Qo]}var Nc=Xo.Buffer={};for(Qo in Lc){if(!Lc.hasOwnProperty(Qo))continue;if(Qo==="allocUnsafe"||Qo==="allocUnsafeSlow")continue;Nc[Qo]=Lc[Qo]}Xo.Buffer.prototype=Lc.prototype;if(!Nc.from||Nc.from===Uint8Array.from)Nc.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 Lc(o,f,h)};if(!Nc.alloc)Nc.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=Lc(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(!Xo.kStringMaxLength)try{Xo.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(o){}if(!Xo.constants){if(Xo.constants={MAX_LENGTH:Xo.kMaxLength},Xo.kStringMaxLength)Xo.constants.MAX_STRING_LENGTH=Xo.kStringMaxLength}I3.exports=Xo});var P3=i(function(aNe,A3){var Lwe=c("assert"),R3=M_().Buffer,Yu=im(),Nwe=nm(),jc=Nwe.newInvalidAsn1Error;function so(o){if(!o||!R3.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(so.prototype,"length",{enumerable:!0,get:function(){return this._len}});Object.defineProperty(so.prototype,"offset",{enumerable:!0,get:function(){return this._offset}});Object.defineProperty(so.prototype,"remain",{get:function(){return this._size-this._offset}});Object.defineProperty(so.prototype,"buffer",{get:function(){return this._buf.slice(this._offset)}});so.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};so.prototype.peek=function(){return this.readByte(!0)};so.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 jc("Indefinite length not supported");if(f>4)throw jc("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};so.prototype.readSequence=function(o){var f=this.peek();if(f===null)return null;if(o!==void 0&&o!==f)throw jc("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};so.prototype.readInt=function(){return this._readTag(Yu.Integer)};so.prototype.readBoolean=function(){return this._readTag(Yu.Boolean)===0?!1:!0};so.prototype.readEnumeration=function(){return this._readTag(Yu.Enumeration)};so.prototype.readString=function(o,f){if(!o)o=Yu.OctetString;var h=this.peek();if(h===null)return null;if(h!==o)throw jc("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?R3.alloc(0):"";var x=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,f?x:x.toString("utf8")};so.prototype.readOID=function(o){if(!o)o=Yu.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 z=f[x]&255;if(y<<=7,y+=z&127,(z&128)===0)h.push(y),y=0}return y=h.shift(),h.unshift(y%40),h.unshift(y/40>>0),h.join(".")};so.prototype._readTag=function(o){Lwe.ok(o!==void 0);var f=this.peek();if(f===null)return null;if(f!==o)throw jc("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 jc("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 z=0;z<this.length;z++)x<<=8,x|=this._buf[this._offset++]&255;if((y&128)===128&&z!==4)x-=1<<z*8;return x>>0};A3.exports=so});var B3=i(function(cNe,D3){var Zi=c("assert"),am=M_().Buffer,Yi=im(),jwe=nm(),cm=jwe.newInvalidAsn1Error,Mwe={size:1024,growthFactor:8};function qwe(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 Jr(o){o=qwe(Mwe,o||{}),this._buf=am.alloc(o.size||1024),this._size=this._buf.length,this._offset=0,this._options=o,this._seq=[]}Object.defineProperty(Jr.prototype,"buffer",{get:function(){if(this._seq.length)throw cm(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}});Jr.prototype.writeByte=function(o){if(typeof o!=="number")throw TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=o};Jr.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 cm("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};Jr.prototype.writeNull=function(){this.writeByte(Yi.Null),this.writeByte(0)};Jr.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)};Jr.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};Jr.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=am.byteLength(o);if(this.writeByte(f),this.writeLength(h),h)this._ensure(h),this._buf.write(o,this._offset),this._offset+=h};Jr.prototype.writeBuffer=function(o,f){if(typeof f!=="number")throw TypeError("tag must be a number");if(!am.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};Jr.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)})};Jr.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(C,w){if(w<128)C.push(w);else if(w<16384)C.push(w>>>7|128),C.push(w&127);else if(w<2097152)C.push(w>>>14|128),C.push((w>>>7|128)&255),C.push(w&127);else if(w<268435456)C.push(w>>>21|128),C.push((w>>>14|128)&255),C.push((w>>>7|128)&255),C.push(w&127);else C.push((w>>>28|128)&255),C.push((w>>>21|128)&255),C.push((w>>>14|128)&255),C.push((w>>>7|128)&255),C.push(w&127)}var y=o.split("."),x=[];x.push(parseInt(y[0],10)*40+parseInt(y[1],10)),y.slice(2).forEach(function(C){h(x,parseInt(C,10))});var z=this;this._ensure(2+x.length),this.writeByte(f),this.writeLength(x.length),x.forEach(function(C){z.writeByte(C)})};Jr.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 cm("Length too long (> 4 bytes)")};Jr.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};Jr.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 cm("Sequence too long")};Jr.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};Jr.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=am.alloc(f);this._buf.copy(h,0,0,this._offset),this._buf=h,this._size=f}};D3.exports=Jr});var L3=i(function(lNe,lm){var q_=nm(),F_=im(),Fwe=P3(),Uwe=B3();lm.exports={Reader:Fwe,Writer:Uwe};for(Xu in F_)if(F_.hasOwnProperty(Xu))lm.exports[Xu]=F_[Xu];var Xu;for(Qu in q_)if(q_.hasOwnProperty(Qu))lm.exports[Qu]=q_[Qu];var Qu});var um=i(function(uNe,N3){var U_=L3();N3.exports={Ber:U_,BerReader:U_.Reader,BerWriter:U_.Writer}});var $3=i(function(dNe,fm){var dm=um().Ber,j3=no()._,pm=no(),M3="-----BEGIN RSA PRIVATE KEY-----",q3="-----END RSA PRIVATE KEY-----",F3="-----BEGIN RSA PUBLIC KEY-----",U3="-----END RSA PUBLIC KEY-----";fm.exports={privateExport:function(o,f){f=f||{};var h=o.n.toBuffer(),y=o.d.toBuffer(),x=o.p.toBuffer(),z=o.q.toBuffer(),C=o.dmp1.toBuffer(),w=o.dmq1.toBuffer(),S=o.coeff.toBuffer(),E=h.length+y.length+x.length+z.length+C.length+w.length+S.length+512,T=new dm.Writer({size:E});if(T.startSequence(),T.writeInt(0),T.writeBuffer(h,2),T.writeInt(o.e),T.writeBuffer(y,2),T.writeBuffer(x,2),T.writeBuffer(z,2),T.writeBuffer(C,2),T.writeBuffer(w,2),T.writeBuffer(S,2),T.endSequence(),f.type==="der")return T.buffer;else return M3+`
141
+ `+pm.linebrk(T.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(/\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 z=new dm.Reader(y);z.readSequence(),z.readString(2,!0),o.setPrivate(z.readString(2,!0),z.readString(2,!0),z.readString(2,!0),z.readString(2,!0),z.readString(2,!0),z.readString(2,!0),z.readString(2,!0),z.readString(2,!0))},publicExport:function(o,f){f=f||{};var h=o.n.toBuffer(),y=h.length+512,x=new dm.Writer({size:y});if(x.startSequence(),x.writeBuffer(h,2),x.writeInt(o.e),x.endSequence(),f.type==="der")return x.buffer;else return F3+`
143
+ `+pm.linebrk(x.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 z=new dm.Reader(y);z.readSequence(),o.setPublic(z.readString(2,!0),z.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 fm.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 fm.exports.publicImport(o,f),!0;return!1}}});var J3=i(function(pNe,ym){var Vn=um().Ber,V3=no()._,hm="1.2.840.113549.1.1.1",gm=no(),H3="-----BEGIN PRIVATE KEY-----",G3="-----END PRIVATE KEY-----",K3="-----BEGIN PUBLIC KEY-----",W3="-----END PUBLIC KEY-----";ym.exports={privateExport:function(o,f){f=f||{};var h=o.n.toBuffer(),y=o.d.toBuffer(),x=o.p.toBuffer(),z=o.q.toBuffer(),C=o.dmp1.toBuffer(),w=o.dmq1.toBuffer(),S=o.coeff.toBuffer(),E=h.length+y.length+x.length+z.length+C.length+w.length+S.length+512,T=new Vn.Writer({size:E});T.startSequence(),T.writeInt(0),T.writeBuffer(h,2),T.writeInt(o.e),T.writeBuffer(y,2),T.writeBuffer(x,2),T.writeBuffer(z,2),T.writeBuffer(C,2),T.writeBuffer(w,2),T.writeBuffer(S,2),T.endSequence();var k=new Vn.Writer({size:E});if(k.startSequence(),k.writeInt(0),k.startSequence(),k.writeOID(hm),k.writeNull(),k.endSequence(),k.writeBuffer(T.buffer,4),k.endSequence(),f.type==="der")return k.buffer;else return H3+`
145
+ `+gm.linebrk(k.buffer.toString("base64"),64)+`
146
+ `+G3},privateImport:function(o,f,h){h=h||{};var y;if(h.type!=="der"){if(Buffer.isBuffer(f))f=f.toString("utf8");if(V3.isString(f)){var x=gm.trimSurroundingText(f,H3,G3).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 z=new Vn.Reader(y);z.readSequence(),z.readInt(0);var C=new Vn.Reader(z.readString(48,!0));if(C.readOID(6,!0)!==hm)throw Error("Invalid Public key format");var w=new Vn.Reader(z.readString(4,!0));w.readSequence(),w.readString(2,!0),o.setPrivate(w.readString(2,!0),w.readString(2,!0),w.readString(2,!0),w.readString(2,!0),w.readString(2,!0),w.readString(2,!0),w.readString(2,!0),w.readString(2,!0))},publicExport:function(o,f){f=f||{};var h=o.n.toBuffer(),y=h.length+512,x=new Vn.Writer({size:y});x.writeByte(0),x.startSequence(),x.writeBuffer(h,2),x.writeInt(o.e),x.endSequence();var z=new Vn.Writer({size:y});if(z.startSequence(),z.startSequence(),z.writeOID(hm),z.writeNull(),z.endSequence(),z.writeBuffer(x.buffer,3),z.endSequence(),f.type==="der")return z.buffer;else return K3+`
147
+ `+gm.linebrk(z.buffer.toString("base64"),64)+`
148
+ `+W3},publicImport:function(o,f,h){h=h||{};var y;if(h.type!=="der"){if(Buffer.isBuffer(f))f=f.toString("utf8");if(V3.isString(f)){var x=gm.trimSurroundingText(f,K3,W3).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 z=new Vn.Reader(y);z.readSequence();var C=new Vn.Reader(z.readString(48,!0));if(C.readOID(6,!0)!==hm)throw Error("Invalid Public key format");var w=new Vn.Reader(z.readString(3,!0));w.readByte(),w.readSequence(),o.setPublic(w.readString(2,!0),w.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 ym.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 ym.exports.publicImport(o,f),!0;return!1}}});var Z3=i(function(mNe,bm){var fNe=no()._,hNe=no();bm.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 bm.exports.privateImport(o,f),!0;else return bm.exports.publicImport(o,f),!0;return!1}}});var tF=i(function(gNe,vm){var Y3=no()._,X3=no(),ed=aa(),Q3="-----BEGIN OPENSSH PRIVATE KEY-----",eF="-----END OPENSSH PRIVATE KEY-----";vm.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(),z=o.coeff.toBuffer(),C=o.p.toBuffer(),w=o.q.toBuffer(),S;if(typeof o.sshcomment<"u")S=Buffer.from(o.sshcomment);else S=Buffer.from([]);let E=15+y.byteLength+4+h.byteLength,T=23+h.byteLength+4+y.byteLength+4+x.byteLength+4+z.byteLength+4+C.byteLength+4+w.byteLength+4+S.byteLength,k=43+E+4+T,O=Math.ceil(T/8)*8-T;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,Ur(I,Buffer.from("none")),Ur(I,Buffer.from("none")),Ur(I,Buffer.from("")),I.off=I.buf.writeUInt32BE(1,I.off),I.off=I.buf.writeUInt32BE(E,I.off),Ur(I,Buffer.from("ssh-rsa")),Ur(I,y),Ur(I,h),I.off=I.buf.writeUInt32BE(k-47-E,I.off),I.off+=8,Ur(I,Buffer.from("ssh-rsa")),Ur(I,h),Ur(I,y),Ur(I,x),Ur(I,z),Ur(I,C),Ur(I,w),Ur(I,S);let A=1;while(I.off<k)I.off=I.buf.writeUInt8(A++,I.off);if(f.type==="der")return I.buf;else return Q3+`
149
+ `+X3.linebrk(R.toString("base64"),70)+`
150
+ `+eF+`
151
+ `},privateImport:function(o,f,h){h=h||{};var y;if(h.type!=="der"){if(Buffer.isBuffer(f))f=f.toString("utf8");if(Y3.isString(f)){var x=X3.trimSurroundingText(f,Q3,eF).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 z={buf:y,off:0};if(y.slice(0,14).toString("ascii")!=="openssh-key-v1")throw"Invalid file format.";if(z.off+=15,Fr(z).toString("ascii")!=="none")throw Error("Unsupported key type");if(Fr(z).toString("ascii")!=="none")throw Error("Unsupported key type");if(Fr(z).toString("ascii")!=="")throw Error("Unsupported key type");if(z.off+=4,z.off+=4,Fr(z).toString("ascii")!=="ssh-rsa")throw Error("Unsupported key type");if(Fr(z),Fr(z),z.off+=12,Fr(z).toString("ascii")!=="ssh-rsa")throw Error("Unsupported key type");let C=Fr(z),w=Fr(z),S=Fr(z),E=Fr(z),T=Fr(z),k=Fr(z),O=new ed(S),R=new ed(k),I=new ed(T),A=O.mod(I.subtract(ed.ONE)),j=O.mod(R.subtract(ed.ONE));o.setPrivate(C,w,S,T,k,A.toBuffer(),j.toBuffer(),E),o.sshcomment=Fr(z).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),z={buf:x,off:0};Ur(z,Buffer.from("ssh-rsa")),Ur(z,h),Ur(z,y);let C=o.sshcomment||"";if(f.type==="der")return z.buf;else return"ssh-rsa "+x.toString("base64")+" "+C+`
152
+ `},publicImport:function(o,f,h){h=h||{};var y;if(h.type!=="der"){if(Buffer.isBuffer(f))f=f.toString("utf8");if(Y3.isString(f)){if(f.substring(0,8)!=="ssh-rsa ")throw Error("Unsupported key format");let S=f.indexOf(" ",8);if(S===-1)S=f.length;else o.sshcomment=f.substring(S+1).replace(/\s+|\n\r|\n|\r$/gm,"");let E=f.substring(8,S).replace(/\s+|\n\r|\n|\r$/gm,"");y=Buffer.from(E,"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},z=Fr(x).toString("ascii");if(z!=="ssh-rsa")throw Error("Invalid key type: "+z);let C=Fr(x),w=Fr(x);o.setPublic(w,C)},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 vm.exports.privateImport(o,f),!0;if(/^[\S\s]*ssh-rsa \s*(?=(([A-Za-z0-9+/=]+\s*)+))\1[\S\s]*$/g.test(f))return vm.exports.publicImport(o,f),!0;return!1}};function Fr(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 Ur(o,f){o.buf.writeInt32BE(f.byteLength,o.off),o.off+=4,o.off+=f.copy(o.buf,o.off)}});var oF=i(function(bNe,vr){var yNe=no()._;function rF(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}}vr.exports={pkcs1:$3(),pkcs8:J3(),components:Z3(),openssh:tF(),isPrivateExport:function(o){return vr.exports[o]&&typeof vr.exports[o].privateExport==="function"},isPrivateImport:function(o){return vr.exports[o]&&typeof vr.exports[o].privateImport==="function"},isPublicExport:function(o){return vr.exports[o]&&typeof vr.exports[o].publicExport==="function"},isPublicImport:function(o){return vr.exports[o]&&typeof vr.exports[o].publicImport==="function"},detectAndImport:function(o,f,h){if(h===void 0){for(var y in vr.exports)if(typeof vr.exports[y].autoImport==="function"&&vr.exports[y].autoImport(o,f))return!0}else if(h){var x=rF(h);if(vr.exports[x.scheme])if(x.keyType==="private")vr.exports[x.scheme].privateImport(o,f,x.keyOpt);else vr.exports[x.scheme].publicImport(o,f,x.keyOpt);else throw Error("Unsupported key format")}return!1},detectAndExport:function(o,f){if(f){var h=rF(f);if(vr.exports[h.scheme])if(h.keyType==="private"){if(!o.isPrivate())throw Error("This is not private key");return vr.exports[h.scheme].privateExport(o,h.keyOpt)}else{if(!o.isPublic())throw Error("This is not public key");return vr.exports[h.scheme].publicExport(o,h.keyOpt)}else throw Error("Unsupported key format")}}}});var cF=i(function(_Ne,aF){/*!
153
+ * RSA library for Node.js
154
+ *
155
+ * Author: rzcoder
156
+ * License MIT
157
+ */var nF=c("constants"),$we=T3(),vNe=c("crypto"),xNe=um().Ber,Ro=no()._,Vwe=no(),iF=ca(),sF=oF();if(typeof nF.RSA_NO_PADDING>"u")nF.RSA_NO_PADDING=3;aF.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,S){if(!(this instanceof z))return new z(C,w,S);if(Ro.isObject(w))S=w,w=void 0;if(this.$options={signingScheme:h,signingSchemeOptions:{hash:"sha256",saltLength:null},encryptionScheme:f,encryptionSchemeOptions:{hash:"sha1",label:null},environment:Vwe.detectEnvironment(),rsaUtils:this},this.keyPair=new $we.Key,this.$cache={},Buffer.isBuffer(C)||Ro.isString(C))this.importKey(C,w);else if(Ro.isObject(C))this.generateKeyPair(C.b,C.e);this.setOptions(S)}return z.prototype.setOptions=function(C){if(C=C||{},C.environment)this.$options.environment=C.environment;if(C.signingScheme){if(Ro.isString(C.signingScheme)){var w=C.signingScheme.toLowerCase().split("-");if(w.length==1)if(o.node.indexOf(w[0])>-1)this.$options.signingSchemeOptions={hash:w[0]},this.$options.signingScheme=h;else this.$options.signingScheme=w[0],this.$options.signingSchemeOptions={hash:null};else this.$options.signingSchemeOptions={hash:w[1]},this.$options.signingScheme=w[0]}else if(Ro.isObject(C.signingScheme))this.$options.signingScheme=C.signingScheme.scheme||h,this.$options.signingSchemeOptions=Ro.omit(C.signingScheme,"scheme");if(!iF.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(C.encryptionScheme){if(Ro.isString(C.encryptionScheme))this.$options.encryptionScheme=C.encryptionScheme.toLowerCase(),this.$options.encryptionSchemeOptions={};else if(Ro.isObject(C.encryptionScheme))this.$options.encryptionScheme=C.encryptionScheme.scheme||f,this.$options.encryptionSchemeOptions=Ro.omit(C.encryptionScheme,"scheme");if(!iF.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)},z.prototype.generateKeyPair=function(C,w){if(C=C||2048,w=w||65537,C%8!==0)throw Error("Key size must be a multiple of 8.");return this.keyPair.generate(C,w.toString(16)),this.$cache={},this},z.prototype.importKey=function(C,w){if(!C)throw Error("Empty key given");if(w)w=x[w]||w;if(!sF.detectAndImport(this.keyPair,C,w)&&w===void 0)throw Error("Key format must be specified");return this.$cache={},this},z.prototype.exportKey=function(C){if(C=C||y,C=x[C]||C,!this.$cache[C])this.$cache[C]=sF.detectAndExport(this.keyPair,C);return this.$cache[C]},z.prototype.isPrivate=function(){return this.keyPair.isPrivate()},z.prototype.isPublic=function(C){return this.keyPair.isPublic(C)},z.prototype.isEmpty=function(C){return!(this.keyPair.n||this.keyPair.e||this.keyPair.d)},z.prototype.encrypt=function(C,w,S){return this.$$encryptKey(!1,C,w,S)},z.prototype.decrypt=function(C,w){return this.$$decryptKey(!1,C,w)},z.prototype.encryptPrivate=function(C,w,S){return this.$$encryptKey(!0,C,w,S)},z.prototype.decryptPublic=function(C,w){return this.$$decryptKey(!0,C,w)},z.prototype.$$encryptKey=function(C,w,S,E){try{var T=this.keyPair.encrypt(this.$getDataForEncrypt(w,E),C);if(S=="buffer"||!S)return T;else return T.toString(S)}catch(k){throw Error("Error during encryption. Original error: "+k)}},z.prototype.$$decryptKey=function(C,w,S){try{w=Ro.isString(w)?Buffer.from(w,"base64"):w;var E=this.keyPair.decrypt(w,C);if(E===null)throw Error("Key decrypt method returns null.");return this.$getDecryptedData(E,S)}catch(T){throw Error("Error during decryption (probably incorrect key). Original error: "+T)}},z.prototype.sign=function(C,w,S){if(!this.isPrivate())throw Error("This is not private key");var E=this.keyPair.sign(this.$getDataForEncrypt(C,S));if(w&&w!="buffer")E=E.toString(w);return E},z.prototype.verify=function(C,w,S,E){if(!this.isPublic())throw Error("This is not public key");return E=!E||E=="buffer"?null:E,this.keyPair.verify(this.$getDataForEncrypt(C,S),w,E)},z.prototype.getKeySize=function(){return this.keyPair.keySize},z.prototype.getMaxMessageSize=function(){return this.keyPair.maxMessageLength},z.prototype.$getDataForEncrypt=function(C,w){if(Ro.isString(C)||Ro.isNumber(C))return Buffer.from(""+C,w||"utf8");else if(Buffer.isBuffer(C))return C;else if(Ro.isObject(C))return Buffer.from(JSON.stringify(C));else throw Error("Unexpected data type")},z.prototype.$getDecryptedData=function(C,w){if(w=w||"buffer",w=="buffer")return C;else if(w=="json")return JSON.parse(C.toString());else return C.toString(w)},z}()});var dF=i(function(zNe,uF){var lF=c("crypto"),Hwe=I_(),Gwe=Wu();class ui{static parseKey(o){if(o.tag!==Gwe.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 Hwe(h.data);if(ui.supportedTypes.dsa===x.toString()||ui.supportedTypes.ec===x.toString())return ui.format(o.buffer);try{let z=y.getOctetString();return ui.export(z)}catch(z){let C=Error("Something went wrong with algorithm "+x.toString()+". For more details see 'error.context'");throw C.context=z,C}}static export(o){if(typeof lF.createPrivateKey==="function")return lF.createPrivateKey({key:o,format:"der",type:"pkcs1"}).export({format:"pem",type:"pkcs8"});else return new(cF())(o,"pkcs1-der").exportKey("pkcs8-pem")+`
158
+ `}static format(o){return`-----BEGIN PRIVATE KEY-----
159
+ `+o.toString("base64").match(/.{1,64}/g).join(`
160
+ `)+`
161
+ -----END PRIVATE KEY-----
162
+ `}}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;uF.exports=ui});var hF=i(function(CNe,fF){var pF=c("crypto"),Kwe=dF(),Wwe=Wu(),Jwe=Fs(),td=cc();class kr{constructor(o){this.messageDigest=pF.createHash(kr.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=pF.createHash(kr.DIGEST_ALG)}recover(o){let f,h,y;if(o.getAlgorithm()!==kr.KEY_PROTECTOR_OID)throw Error("Unsupported key protection alghorithm");let z=o.getEncryptedData(),C=td(z,0,kr.SALT_LEN);if(y=z.length-kr.SALT_LEN-kr.DIGEST_LEN,h=Math.floor(y/kr.DIGEST_LEN),y%kr.DIGEST_LEN!==0)h++;let w=td(z,kr.SALT_LEN,y+kr.SALT_LEN),S=Buffer.alloc(w.length);for(let T=0,k=0,O=C;T<h;T++,k+=kr.DIGEST_LEN)if(this.messageDigest.update(this.passwdBytes),this.messageDigest.update(O),O=this.messageDigest.digest(),this.resetDigest(),T<h-1)S=Buffer.concat([td(S,0,k),O]);else S=Buffer.concat([td(S,0,k),td(O,0,w.length-k)]);let E=Buffer.alloc(w.length);for(let T=0;T<E.length;T++)E[T]=w[T]^S[T];this.messageDigest.update(this.passwdBytes),this.messageDigest.update(E),f=this.messageDigest.digest(),this.resetDigest();for(let T=0;T<f.length;T++)if(f[T]!=z[kr.SALT_LEN+y+T])throw Error("Cannot recover key");return Kwe.parseKey(new Wwe(new Jwe(E)))}}kr.SALT_LEN=20;kr.DIGEST_ALG="sha1";kr.DIGEST_LEN=20;kr.KEY_PROTECTOR_OID="1.3.6.1.4.1.42.2.17.1.1";fF.exports=kr});var yF=i(function(wNe,gF){class mF{generate(o){return`-----BEGIN CERTIFICATE-----
163
+ `+o.toString("base64").match(/.{1,64}/g).join(`
164
+ `)+`
165
+ -----END CERTIFICATE-----
166
+ `}}gF.exports=mF});var _F=i(function(SNe,xF){var bF=yF();class vF{constructor(){this.algorithms={X509:bF,"X.509":bF}}get(o){if(!this.algorithms[o])throw Error("The certificate type "+o+" is not supported");return new this.algorithms[o]}}xF.exports=vF});var EF=i(function(ENe,SF){var Zwe=OM(),$_=Wq(),Ywe=Sx(),Xwe=Ex(),Qwe=r3(),eSe=hF(),tSe=_F(),zF=(o)=>new tSe().get(o.certType).generate(o.value),CF=(o,f="")=>{let h=new Qwe(o);return new eSe(f).recover(h)},wF=(o,f)=>new Zwe(o,f).parse(),rSe=(o,f)=>new $_(o,f).parse(),oSe=(o,f)=>{let h=new $_(o,f),y=h.parse();return h.toPem(y)},nSe=(o,f,h)=>{if(h===void 0)h=f;return wF(o,f).reduce((x,z)=>{if(z instanceof Xwe)return Object.assign({},x,{[z.alias]:{ca:zF(z.cert)}});else if(z instanceof Ywe)return Object.assign({},x,{[z.alias]:{cert:z.chain.map(zF).join(`
167
+ `),key:CF(z.protectedPrivateKey,h)}})},{})},iSe=function(o,f,h){if($_.probe(o))return oSe(o,f,h);else return nSe(o,f,h)};SF.exports={toPem:iSe,parseJks:wF,decrypt:CF,parsePkcs12:rSe}});var xm=i(function(IF){Object.defineProperty(IF,"__esModule",{value:!0});IF.registerDestinationCache=IF.RegisterDestinationCache=void 0;var TF=c("fs/promises"),sSe=c("crypto"),aSe=se(),cSe=ah(),kF=ac(),lSe=aSe.createLogger("register-destination-cache");class OF extends cSe.AsyncCache{constructor(o=300000){super(o)}}var uSe=(o=new OF)=>{let f={useMtlsCache:!1,retrieveMtlsOptionsFromCache:async()=>o.get("mtlsOptions"),cacheMtlsOptions:async()=>{let h=TF.readFile(process.env.CF_INSTANCE_CERT,"utf8"),y=TF.readFile(process.env.CF_INSTANCE_KEY,"utf8"),[x,z]=await Promise.all([h,y]);o.set("mtlsOptions",{entry:{cert:x,key:z},expires:dSe(x)})},getMtlsOptions:async()=>{let h=await f.retrieveMtlsOptionsFromCache();if(!h){if(await f.cacheMtlsOptions(),h=await f.retrieveMtlsOptionsFromCache(),!h)lSe.warn("Neither the previous nor the current mtls certificate is valid anymore.")}return h||{}},clear:async()=>o.clear(),getCacheInstance:()=>o};return f};function dSe(o){return Number(new sSe.X509Certificate(o).validTo)}var pSe=()=>({destination:kF.DestinationCache(new kF.DefaultDestinationCache(0)),mtls:uSe()});IF.RegisterDestinationCache=pSe;IF.registerDestinationCache=IF.RegisterDestinationCache()});var FF=i(function(Or){var fSe=Or&&Or.__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]}),hSe=Or&&Or.__setModuleDefault||(Object.create?function(o,f){Object.defineProperty(o,"default",{enumerable:!0,value:f})}:function(o,f){o.default=f}),mSe=Or&&Or.__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")fSe(h,f,y[x])}return hSe(h,f),h}}(),LF=Or&&Or.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Or,"__esModule",{value:!0});Or.defaultAgentOptions=Or.agentCache=void 0;Or.getAgentConfig=MF;Or.urlAndAgent=ISe;var PF=c("node:fs/promises"),gSe=LF(c("node:http")),ySe=LF(c("node:https")),bSe=mSe(EF()),NF=se(),H_=oh(),fd=_u(),jF=Ds(),G_=js(),DF=xm(),xn=NF.createLogger({package:"connectivity",messageContext:"http-agent"});async function MF(o){let f={...vSe(o),...xSe(o),...await _Se(o)};return OSe(o,f)}function vSe(o){if(H_.getProtocolOrDefault(o)==="http"){if(o.isTrustingAllCertificates)xn.warn('"isTrustingAllCertificates" is not available for HTTP.');if(o.trustStoreCertificate)xn.warn('"trustStore" is not available for HTTP.');return{}}if(o.isTrustingAllCertificates&&o.trustStoreCertificate)xn.warn(`Destination ${o.name} contains the 'trustAll' and 'trustStoreLocation' property which is a redundant setup.`);if(o.isTrustingAllCertificates)return xn.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 xSe(o){if(o.authentication==="ClientCertificateAuthentication"&&!(V_(o)||o.mtlsKeyPair)&&o.keyStoreName){let f=CSe(o);if(wSe(f),xn.debug(`Certificate with name "${f.name}" selected.`),!o.keyStorePassword)xn.debug(`Destination '${o.name}' does not have a keystore password.`);let h=Buffer.from(f.content,"base64");if(_m(f)==="jks"||_m(f)==="keystore"){let y=bSe.toPem(h,o.keyStorePassword||""),x=Object.keys(y);if(x.length===0)throw Error("No entries found in JKS keystore");let z=x[0];if(x.length>1)xn.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 C=y[z];if(!C.cert||!C.key)throw Error("Invalid JKS entry: missing cert or key");return{cert:Buffer.from(C.cert,"utf8"),key:Buffer.from(C.key,"utf8")}}if(_m(f)==="pem")return{cert:h,key:h,passphrase:o.keyStorePassword};return{pfx:h,passphrase:o.keyStorePassword}}return{}}async function _Se(o){if(o.mtls&&!(process.env.CF_INSTANCE_CERT&&process.env.CF_INSTANCE_KEY))xn.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(V_(o))xn.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(V_(o)){if(DF.registerDestinationCache.mtls.useMtlsCache)return DF.registerDestinationCache.mtls.getMtlsOptions();let f=PF.readFile(process.env.CF_INSTANCE_CERT,"utf8"),h=PF.readFile(process.env.CF_INSTANCE_KEY,"utf8"),[y,x]=await Promise.all([f,h]);return{cert:y,key:x}}return{}}function V_(o){return o.mtls&&process.env.CF_INSTANCE_CERT&&process.env.CF_INSTANCE_KEY}var qF=["p12","pfx","pem","jks","keystore"];function zSe(o){return!!o&&qF.includes(o)}function CSe(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 _m(o){return NF.last(o.name.split("."))}function wSe(o){let f=_m(o);if(!zSe(f))throw Error(`The format of the provided certificate '${o.name}' is not supported. Supported formats are: ${qF.join(", ")}.`)}Or.agentCache=new jF.Cache(3600000,100);Or.defaultAgentOptions={keepAlive:!0,timeout:5000};function SSe(o,f){let y={protocol:H_.getProtocolOrDefault(o),options:f,agentOptions:o.agentOptions};if(o.proxyType!=="OnPremise")return y;let x=ESe(o),z=TSe(o);if(x.status!=="derived"||z.status==="invalid"||o.authentication==="PrincipalPropagation"&&(z.status!=="derived"||!z.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,z.status==="derived")y.principal=z.scope;return y}function ESe(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),z=y.clientid;if(!x&&!z)return{status:"invalid"};return{status:"derived",scope:{tenantId:x,clientId:z}}}catch{return{status:"invalid"}}}function TSe(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),z=fd.userId(y);if(!x&&!z)return{status:"invalid"};return{status:"derived",scope:{userId:z,tenantId:x}}}catch{return{status:"invalid"}}}async function kSe(o,f){let h=SSe(o,f);if(!h)return;return jF.hashCacheKey(h)}function BF(o,f,h){let y=H_.getProtocolOrDefault(o);xn.debug(`Creating new ${y.toUpperCase()} agent for destination ${o.name||"<unknown>"}`);let x={...Or.defaultAgentOptions,...!h?{keepAlive:!1}:{},...o.agentOptions,...f};return y==="https"?{httpsAgent:new ySe.default.Agent(x)}:{httpAgent:new gSe.default.Agent(x)}}async function OSe(o,f){let h=await kSe(o,f);if(!h)return xn.info(`Could not derive a cache key for destination ${o.name||"<unknown>"}. Creating a new agent without caching.`),BF(o,f,!1);return Or.agentCache.getOrInsertComputed(h,()=>({entry:BF(o,f,!0)}))}async function ISe(o){let f={url:o,proxyType:"Internet"};if(G_.proxyStrategy(f)==="internet")f=G_.addProxyConfigurationInternet(f);return{baseURL:f.url,...await MF(f),proxy:G_.getProxyConfig(f)}}});var zm=i(function(Xi){var RSe=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]}),UF=Xi&&Xi.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))RSe(f,o,h)};Object.defineProperty(Xi,"__esModule",{value:!0});UF(cM(),Xi);UF(FF(),Xi)});var K_=i(function(VF){Object.defineProperty(VF,"__esModule",{value:!0});VF.destinationServiceCache=void 0;var ASe=Ds(),$F=ac(),PSe=(o)=>({retrieveDestinationsFromCache:(f,h)=>o.get($F.getDestinationCacheKey(h,f,"tenant")),cacheRetrievedDestinations:(f,h,y)=>{let x=$F.getDestinationCacheKey(h,f,"tenant");o.set(x,{entry:y})},clear:()=>{o.clear()},getCacheInstance:()=>o});VF.destinationServiceCache=PSe(new ASe.Cache(300000))});var wm=i(function(zo){var DSe=zo&&zo.__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]}),BSe=zo&&zo.__setModuleDefault||(Object.create?function(o,f){Object.defineProperty(o,"default",{enumerable:!0,value:f})}:function(o,f){o.default=f}),LSe=zo&&zo.__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")DSe(h,f,y[x])}return BSe(h,f),h}}(),NSe=zo&&zo.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(zo,"__esModule",{value:!0});zo.fetchDestinations=$Se;zo.fetchDestinationWithoutTokenRetrieval=VSe;zo.fetchCertificate=HSe;zo.fetchDestinationWithTokenRetrieval=GSe;var _n=se(),W_=LSe(Ss()),jSe=Va(),MSe=af(),qSe=NSe(gb()),Qi=Wr(),FSe=zm(),USe=Ru(),yd=nc(),GF=K_(),Cm=_n.createLogger({package:"connectivity",messageContext:"destination-service"});async function $Se(o,f,h,y){let x=`${_n.removeTrailingSlashes(o)}/destination-configuration/v1/${h}Destinations`;if(y?.useCache){let C=GF.destinationServiceCache.retrieveDestinationsFromCache(x,Qi.decodeJwt(f));if(C)return Cm.debug(`Destinations retrieved from cache. There were ${C.length} destinations returned from the cache.`),C}let z=Qi.wrapJwtInHeader(f).headers;return Z_({uri:x,tenantId:gd(f)},z).then((C)=>{let w=C.data.map((S)=>yd.parseDestination(S));if(y?.useCache)GF.destinationServiceCache.cacheRetrievedDestinations(x,Qi.decodeJwt(f),w);return w}).catch((C)=>{throw new _n.ErrorWithCause(`Failed to fetch ${h} destinations.${J_(C)}`,C)})}async function VSe(o,f,h){let y=`${_n.removeTrailingSlashes(f)}/destination-configuration/v1/destinations/${o}?$skipTokenRetrieval=true`;try{let x=await Z_({uri:y,tenantId:gd(h)},{Authorization:`Bearer ${h}`}),z=yd.parseDestination(x.data.destinationConfiguration);return{instance:x.data.owner?.InstanceId?[z]:[],subaccount:!x.data.owner?.InstanceId&&x.data.owner?.SubaccountId?[z]:[]}}catch(x){if((0,W_.isAxiosError)(x)&&x.response?.status===404&&x.response?.data?.ErrorMessage==="Configuration with the specified name was not found")return{instance:[],subaccount:[]};throw new _n.ErrorWithCause(`Failed to fetch destination.${J_(x)}`,x)}}async function HSe(o,f,h){if(h.split(".")[1].toLowerCase()!=="pem"){Cm.warn(`The provided truststore ${h} is not in 'pem' format which is currently the only supported format. Truststore is ignored.`);return}let x=`${_n.removeTrailingSlashes(o)}/destination-configuration/v1/subaccountCertificates/${h}`,z=`${_n.removeTrailingSlashes(o)}/destination-configuration/v1/instanceCertificates/${h}`,C=Qi.wrapJwtInHeader(f).headers;try{let w=await KF({uri:x,tenantId:gd(f)},C).catch(()=>KF({uri:z,tenantId:gd(f)},C));return yd.parseCertificate(w.data)}catch(w){Cm.warn(`Failed to fetch truststore certificate ${h} - Continuing without certificate. This may cause failing requests`,w)}}function gd(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 GSe(o,f,h){let y=`${_n.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,Z_({uri:y,tenantId:gd(f)},x,h).then((z)=>yd.parseDestination(z.data)).catch((z)=>{throw new _n.ErrorWithCause(`Failed to fetch destination ${h.destinationName}.${J_(z)}`,z)})}function J_(o){return _n.propertyExists(o,"response","data","ErrorMessage")?` ${o.response.data.ErrorMessage}`:""}function KSe(o){return(f)=>(h)=>{let y=1;return(0,qSe.default)(async(x)=>{try{let z=await f.fn(h);if(y<3)y++,await USe.buildAuthorizationHeaders(yd.parseDestination(z.data));return z}catch(z){let C=(0,W_.isAxiosError)(z)?z.response?.status:void 0;if(C?.toString().startsWith("4")){x(new _n.ErrorWithCause(`Request failed with status code ${C}`,z));return}throw z}},{retries:3,onRetry:(x)=>Cm.warn(`Failed to retrieve destination ${o} - doing a retry. Original Error ${x.message}`)})}}async function KF(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 WF(o,f)}async function Z_(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 WF(o,f,h)}async function WF(o,f,h){let{destinationName:y,retry:x}=h||{},z={...await FSe.urlAndAgent(o.uri),method:"get",headers:f},C=MSe.resilience();if(y&&x)C.unshift(KSe(y));return jSe.executeWithMiddleware(C,{context:o,fnArgument:z,fn:(w)=>W_.default.request(w)})}});var Sm=i(function(JF){Object.defineProperty(JF,"__esModule",{value:!0});JF.getProviderServiceToken=ZSe;var WSe=Wr(),JSe=Bi();async function ZSe(o){let{jwt:f,...h}=o,y=await JSe.serviceToken("destination",h);return{encoded:y,decoded:WSe.decodeJwt(y)}}});var Em=i(function(XF){Object.defineProperty(XF,"__esModule",{value:!0});XF.isSubscriberToken=tEe;XF.getSubscriberToken=rEe;XF.getRequiredSubscriberToken=iEe;XF.hasTokens=aEe;XF.getJwtForTenant=cEe;XF.getJwtForUser=lEe;var XSe=se(),ZF=Wr(),QSe=Bi(),eEe=xu(),YF=XSe.createLogger({package:"connectivity",messageContext:"destination-accessor-service"});function tEe(o){return o.userJwt||o.serviceJwt}async function rEe(o){let f=o.jwt?ZF.getJwtPair(o.jwt):void 0,h=await oEe(o,f?.decoded);return{userJwt:f,serviceJwt:h}}async function oEe(o,f){let h=nEe(o.iss,f);if(h)try{return ZF.getJwtPair(await QSe.serviceToken("destination",{...o,jwt:h}))}catch(y){YF.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 nEe(o,f){if(o)return YF.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:eEe.getIssuerSubdomain({iss:o})}};if(f?.zid||f?.app_tid)return f}function iEe(o){if(o){let{userJwt:f,serviceJwt:h}=o,y={userJwt:f||h,serviceJwt:h||f};if(sEe(y))return y}throw Error("Could not get subscriber token: Token value is undefined.")}function sEe(o){return!!(o?.userJwt&&o.serviceJwt)}function aEe(o){return!!o?.userJwt||!!o?.serviceJwt}function cEe(o){return o.serviceJwt}function lEe(o){return o.userJwt}});var Y_=i(function(rU){Object.defineProperty(rU,"__esModule",{value:!0});rU.DestinationFromServiceRetriever=void 0;rU.getDestinationFromDestinationService=CEe;var gEe=se(),yEe=mx(),la=mn(),bEe=Iu(),Tm=Wr(),vEe=gx(),QF=Bi(),km=ac(),Om=Cx(),Mc=wm(),xEe=Ns(),_Ee=Sm(),bd=Em(),tU=js(),zEe=sc(),es=gEe.createLogger({package:"connectivity",messageContext:"destination-accessor-service"}),eU={instance:[],subaccount:[]};async function CEe(o){return es.debug("Attempting to retrieve destination from destination service."),di.getDestinationFromDestinationService(o)}class di{static async getDestinationFromDestinationService(o){if(bEe.shouldExchangeToken(o))o.jwt=await QF.jwtBearerToken(o.jwt,"destination");let f=new di(o,await bd.getSubscriberToken(o),await _Ee.getProviderServiceToken(o)),h=await f.searchDestinationWithSelectionStrategyAndCache();if(!h)return null;let{origin:y,fromCache:x}=h,{destination:z}=h;if(!x)z=await f.fetchAndAddAuthTokenIfNeeded(z,y),z=await f.addTrustStoreConfigurationIfNeeded(z,y),await f.cacheDestination(z,y);return z=zEe.addForwardedAuthTokenIfNeeded(z,o.jwt),z=await f.addProxyConfiguration(z),z}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:km.getDefaultIsolationStrategy(f?.userJwt?.decoded),selectionStrategy:Om.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=Tm.getSubdomain(this.subscriberToken?.serviceJwt?.decoded)||Tm.getSubdomain(this.subscriberToken?.userJwt?.decoded),h=Tm.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}".
168
+ The property SystemUser has been deprecated.
169
+ It is highly recommended that you stop using it.
170
+ 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=Tm.isXsuaaToken(this.subscriberToken.userJwt.decoded);if(!y)di.checkDestinationForCustomJwt(o);if(y&&vEe.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 QF.jwtBearerToken(this.subscriberToken.userJwt.encoded,wEe())};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 Mc.fetchDestinationWithTokenRetrieval(la.getDestinationServiceCredentials().uri,h,this.options)}async fetchDestinationWithUserExchangeFlows(o,f){let h=await this.getAuthTokenForOAuth2UserBasedTokenExchanges(o,f);return Mc.fetchDestinationWithTokenRetrieval(la.getDestinationServiceCredentials().uri,h,this.options)}async fetchDestinationWithRefreshTokenFlow(o,f){let h=await this.getAuthTokenForOAuth2RefreshToken(o,f);return Mc.fetchDestinationWithTokenRetrieval(la.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(tU.proxyStrategy(o)){case"on-premise":return yEe.addProxyConfigurationOnPrem(o,bd.hasTokens(this.subscriberToken)?bd.getRequiredSubscriberToken(this.subscriberToken):void 0);case"internet":case"private-link":return xEe.assertHttpDestination(o),tU.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 km.destinationCache.cacheRetrievedDestination(f==="subscriber"?bd.getRequiredSubscriberToken(this.subscriberToken):this.providerServiceToken.decoded,o,this.options.isolationStrategy)}async getProviderDestinationService(){let o=await Mc.fetchDestinationWithoutTokenRetrieval(this.options.destinationName,la.getDestinationServiceCredentials().uri,this.providerServiceToken.encoded),f=this.options.selectionStrategy({subscriber:eU,provider:o},this.options.destinationName);if(f)return{destination:f,fromCache:!1,origin:"provider"}}async getProviderDestinationCache(){let o=await km.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 Mc.fetchDestinationWithoutTokenRetrieval(this.options.destinationName,la.getDestinationServiceCredentials().uri,this.subscriberToken.serviceJwt.encoded),f=this.options.selectionStrategy({subscriber:o,provider:eU},this.options.destinationName);if(f)return{destination:f,fromCache:!1,origin:"subscriber"}}async getSubscriberDestinationCache(){let o=await km.destinationCache.retrieveDestinationFromCache(bd.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()===Om.alwaysSubscriber.toString())return!1;if(this.options.selectionStrategy.toString()===Om.subscriberFirst.toString()&&o)return!1;return!0}isSubscriberNeeded(){if(!this.subscriberToken?.serviceJwt)return!1;return this.options.selectionStrategy.toString()!==Om.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 Mc.fetchCertificate(la.getDestinationServiceCredentials().uri,f==="provider"?this.providerServiceToken.encoded:this.subscriberToken.serviceJwt.encoded,y);return{...o,trustStoreCertificate:x}}return o}}rU.DestinationFromServiceRetriever=di;function wEe(){let o=la.getServiceBinding("destination");if(!o)throw Error("No binding to a destination service found.");return o}});var Q_=i(function(aU){Object.defineProperty(aU,"__esModule",{value:!0});aU.registerDestination=IEe;aU.searchRegisteredDestination=REe;var EEe=se(),Rm=Wr(),TEe=ac(),kEe=Ns(),nU=js(),Im=xm(),OEe=sc(),X_=EEe.createLogger({package:"connectivity",messageContext:"register-destination"});async function IEe(o,f){if(!o.name)throw Error("Registering destinations requires a destination name.");if(o.mtls=!!f?.inferMtls,f?.useMtlsCache)Im.registerDestinationCache.mtls.useMtlsCache=!0,await Im.registerDestinationCache.mtls.cacheMtlsOptions();await Im.registerDestinationCache.destination.cacheRetrievedDestination(iU(f),o,sU(f))}function iU(o){let f=Rm.decodeOrMakeJwt(o?.jwt);if(!Rm.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 X_.debug("Could not determine tenant from XSUAA, identity or destination service binding. Destination is registered without tenant information.");return{zid:Rm.defaultTenantId}}return f}async function REe(o){let f=await Im.registerDestinationCache.destination.retrieveDestinationFromCache(iU(o),o.destinationName,sU(o));if(!f)return X_.debug(`Could not retrieve '${o.destinationName}' from registered destinations.`),null;if(X_.info(`Successfully retrieved destination '${o.destinationName}' from registered destinations.`),f=OEe.addForwardedAuthTokenIfNeeded(f,o.jwt),kEe.isHttpDestination(f)&&["internet","private-link"].includes(nU.proxyStrategy(f)))f=nU.addProxyConfigurationInternet(f);return f}function sU(o){if(o?.isolationStrategy)return o.isolationStrategy;let f=o?.jwt?Rm.decodeJwt(o.jwt):void 0;return TEe.getDefaultIsolationStrategy(f)}});var mU=i(function(hU){Object.defineProperty(hU,"__esModule",{value:!0});hU.useOrFetchDestination=pU;hU.resolveDestination=HEe;hU.getDestination=fU;hU.getAllDestinationsFromDestinationService=GEe;var uU=se(),DEe=Iu(),BEe=mn(),LEe=Wr(),NEe=Bi(),dU=nc(),jEe=ux(),MEe=fx(),qEe=Y_(),FEe=eh(),UEe=Q_(),$Ee=Em(),VEe=Sm(),cU=wm(),vd=uU.createLogger({package:"connectivity",messageContext:"destination-accessor"});async function pU(o){return FEe.isDestinationFetchOptions(o)?fU(o):dU.sanitizeDestination(o)}async function HEe(o){let f=await pU(o).catch((h)=>{throw new uU.ErrorWithCause("Failed to load destination.",h)});if(!f)throw Error(`Failed to resolve the destination '${dU.toDestinationNameUrl(o)}'.`);return f}async function fU(o){return jEe.searchEnvVariablesForDestination(o)||await UEe.searchRegisteredDestination(o)||await MEe.searchServiceBindingForDestination(o)||await qEe.getDestinationFromDestinationService(o)}function lU(o,f){return f.reduce((h,y)=>h+`Retrieving ${o} destination: ${y.name}.
171
+ `,"")}async function GEe(o={}){if(o={...o,useCache:o.useCache??!0},vd.debug("Attempting to retrieve all destinations from destination service."),DEe.shouldExchangeToken(o)&&o.jwt)o.jwt=await NEe.jwtBearerToken(o.jwt,"destination");let f=(await $Ee.getSubscriberToken(o))?.serviceJwt||await VEe.getProviderServiceToken(o),h=BEe.getDestinationServiceCredentials().uri,y=LEe.getSubdomain(f.decoded);vd.debug(`Retrieving all destinations for account: "${y}" from destination service.`);let[x,z]=await Promise.all([cU.fetchDestinations(h,f.encoded,"instance",o),cU.fetchDestinations(h,f.encoded,"subaccount",o)]),C=lU("instance",x)+lU("subaccount",z);vd.debug(C);let w=[...x,...z];if(w?.length)vd.debug(`Successfully retrieved all destinations for account: "${y}" from destination service.`);else return vd.debug("Didn't receive any destinations from destination service."),[];return w.map((E)=>(delete E.authTokens,E))}});var yU=i(function(gU){Object.defineProperty(gU,"__esModule",{value:!0})});var bU=i(function(Ut){var YEe=Ut&&Ut.__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]}),fr=Ut&&Ut.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))YEe(f,o,h)};Object.defineProperty(Ut,"__esModule",{value:!0});fr(mU(),Ut);fr(eh(),Ut);fr(ac(),Ut);fr(ux(),Ut);fr(Y_(),Ut);fr(Q_(),Ut);fr(fx(),Ut);fr(Cx(),Ut);fr(K_(),Ut);fr(Ns(),Ut);fr(wm(),Ut);fr(nc(),Ut);fr(sc(),Ut);fr(Em(),Ut);fr(Sm(),Ut);fr(js(),Ut);fr(yU(),Ut);fr(Xf(),Ut);fr(dx(),Ut);fr(xm(),Ut)});var xU=i(function(vU){Object.defineProperty(vU,"__esModule",{value:!0})});var zU=i(function(_U){Object.defineProperty(_U,"__esModule",{value:!0});_U.buildHeadersForDestination=QEe;var ez=se(),XEe=Ru();async function QEe(o){let f=await XEe.buildAuthorizationHeaders(o),h=eTe(o);return ez.mergeIgnoreCase(o.headers,{...f,...h})}function eTe(o){let f=ez.pickNonNullish({"sap-client":o.sapClient,"SAP-Connectivity-SCC-Location_ID":o.cloudConnectorLocationId});return ez.mergeLeftIgnoreCase(f,o.headers)}});var wU=i(function(CU){Object.defineProperty(CU,"__esModule",{value:!0})});var EU=i(function(SU){Object.defineProperty(SU,"__esModule",{value:!0})});var tz=i(function(Gt){var rTe=Gt&&Gt.__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]}),xr=Gt&&Gt.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))rTe(f,o,h)};Object.defineProperty(Gt,"__esModule",{value:!0});xr(bU(),Gt);xr(Ru(),Gt);xr(Ds(),Gt);xr(nx(),Gt);xr(mx(),Gt);xr(xU(),Gt);xr(mn(),Gt);xr(oh(),Gt);xr(zU(),Gt);xr(Iu(),Gt);xr(wU(),Gt);xr(Wr(),Gt);xr(th(),Gt);xr(xu(),Gt);xr(gx(),Gt);xr(Bi(),Gt);xr(EU(),Gt);xr(ix(),Gt);xr(ah(),Gt)});var Am=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=tz();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 oTe=zm();Object.defineProperty(wt,"getAgentConfig",{enumerable:!0,get:function(){return oTe.getAgentConfig}})});var Pm=i(function(ts){var iTe=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]}),TU=ts&&ts.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))iTe(f,o,h)};Object.defineProperty(ts,"__esModule",{value:!0});TU(zm(),ts);TU(tz(),ts)});var oz=i(function(kU){Object.defineProperty(kU,"__esModule",{value:!0});kU.isOriginOptions=rz;kU.isHttpRequestConfigWithOrigin=sTe;function rz(o){return!!o&&(typeof o.requestConfig==="object"||typeof o.custom==="object")}function sTe(o){return rz(o.headers)||rz(o.params)}});var Dm=i(function(OU){Object.defineProperty(OU,"__esModule",{value:!0});OU.origins=OU.defaultDisallowedKeys=void 0;OU.filterCustomRequestConfig=uTe;OU.mergeOptionsWithPriority=dTe;var nz=se(),lTe=nz.createLogger({package:"http-client",messageContext:"http-request-config"});function uTe(o,f=OU.defaultDisallowedKeys){let h=Object.keys(o).filter((y)=>f.includes(y));if(h.length)lTe.warn(`The following keys are found in the custom request config that will be removed: ${h.join(", ")}`);return nz.exclude(f,o)}OU.defaultDisallowedKeys=["url","baseURL","data","headers","params"];function dTe(o){if(o)return OU.origins.reduce((f,h)=>nz.mergeIgnoreCase(f,o[h]),{})}OU.origins=["requestConfig","destination","destinationProperty","custom"]});var dz=i(function(Nt){var hTe=Nt&&Nt.__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]}),mTe=Nt&&Nt.__setModuleDefault||(Object.create?function(o,f){Object.defineProperty(o,"default",{enumerable:!0,value:f})}:function(o,f){o.default=f}),RU=Nt&&Nt.__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")hTe(h,f,y[x])}return mTe(h,f),h}}(),gTe=Nt&&Nt.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Nt,"__esModule",{value:!0});Nt.encodeAllParameters=Nt.oDataTypedClientParameterEncoder=void 0;Nt.buildHttpRequest=PU;Nt.execute=cz;Nt.buildHttpRequestConfigWithOrigin=DU;Nt.buildRequestWithMergedHeadersAndQueryParameters=BU;Nt.executeHttpRequest=ATe;Nt.executeHttpRequestWithOrigin=PTe;Nt.getAxiosConfigWithDefaults=NU;Nt.getAxiosConfigWithDefaultsWithoutMethod=jU;Nt.getDefaultHttpRequestConfigOptions=lz;Nt.getDefaultHttpRequestOptions=uz;var yTe=RU(c("http")),bTe=RU(c("https")),az=Am(),ua=Pm(),vTe=Va(),Lm=se(),xTe=gTe(Ss()),_Te=oz(),AU=Dm(),zTe=nf(),Bm=Lm.createLogger({package:"http-client",messageContext:"http-client"});async function PU(o){let f=await ua.resolveDestination(o);ua.assertHttpDestination(f);let h=await NTe(f);return DTe(f,h)}function cz(o){return async function(f,h,y){let x=await ua.resolveDestination(f);ua.assertHttpDestination(x);let z=await PU(x);ITe(h.headers);let C=await BU(h,x,z,f.jwt);if(y?.fetchCsrfToken)h.middleware=[...h.middleware||[],zTe.csrf()];return vTe.executeWithMiddleware(h.middleware,{fnArgument:C,fn:(w)=>(RTe(C),o(w)),context:{jwt:f.jwt,uri:x.url,destinationName:x.name??void 0,tenantId:az.getTenantId(f.jwt)}})}}function DU(o){if(!o)return lz();if(_Te.isHttpRequestConfigWithOrigin(o))return o;return{...o,headers:{requestConfig:{},...o.headers&&{custom:o.headers}},params:{requestConfig:{},...o.params&&{custom:o.params}}}}var CTe=(o)=>o;Nt.oDataTypedClientParameterEncoder=CTe;function sz(o){let{parameterEncoder:f,parameters:h,exclude:y}=o;return Object.fromEntries(Object.entries(h).map(([x,z])=>y.includes(x)?[x,z]:[x,z?f(z):z]))}function wTe(o){return o.name===Nt.oDataTypedClientParameterEncoder.name}function STe(o,f){let{parameterEncoder:h}=f;if(Lm.isNullish(h))return sz({parameters:o,parameterEncoder:Nt.encodeAllParameters,exclude:["custom"]});if(wTe(h))return sz({parameters:o,parameterEncoder:Nt.encodeAllParameters,exclude:["custom","requestConfig"]});return sz({parameters:o,parameterEncoder:h,exclude:[]})}async function BU(o,f,h,y){let{paramsOriginOptions:x,headersOriginOptions:z,requestConfigBase:C}=OTe(o),w=kTe(f,x),S=STe(w,o),E=AU.mergeOptionsWithPriority(S),T=await ETe(f,h.headers,z,y),k=jTe(h,C);return k.headers=T||{},k.params=E||{},k}async function ETe(o,f,h,y){let x=ua.getAdditionalHeaders(o.originalProperties||{}).headers;return f=o.forwardAuthToken?TTe(f,y):f,AU.mergeOptionsWithPriority({requestConfig:h?.requestConfig,custom:{...h?.custom},destinationProperty:x,destination:f})}function TTe(o,f){if(f)return{...o,authorization:`Bearer ${f}`};return Bm.debug("The `forwardAuthToken` is set, but the JWT is missing. Please provide a valid JWT to enable token forwarding."),o}function kTe(o,f){let h=ua.getAdditionalQueryParameters(o.originalProperties||{}).queryParameters;return{...f,destinationProperty:h,destination:o.queryParameters}}function OTe(o){let{params:f,headers:h}=o;return{paramsOriginOptions:f,headersOriginOptions:h,requestConfigBase:o}}function ITe(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)Bm.debug(`The following custom headers will overwrite headers created by the SDK, if they use the same key:
172
+ ${y.map((x)=>` - "${x}"`).join(`
173
+ `)}
174
+ If the parameters from multiple origins use the same key, the priority is 1. Custom, 2. Destination, 3. Internal.`)}}function RTe(o){let f=`Execute '${o.method}' request with target: ${o.url}.`;if(o.headers){let h=Object.entries(Lm.sanitizeRecord(o.headers)).map(([y,x])=>`${y}:${x}`).join(`
175
+ `);Bm.debug(`${f}
176
+ The headers of the request are:
177
+ ${h}`)}else Bm.debug(f)}function ATe(o,f,h){let y=DU(f);return cz(LU)(o,y,{...uz(),...h})}function PTe(o,f,h){let y=f??lz();return cz(LU)(o,y,{...uz(),...h})}async function DTe(o,f){let h=BTe(o);return{baseURL:o.url,headers:f,params:o.queryParameters,proxy:ua.getProxyConfig(o),...h&&{beforeRedirect:h},...await az.getAgentConfig(o)}}function BTe(o){let f=o.proxyConfiguration?.headers;if(!Object.keys(f||{}).length)return;return(h)=>{if(!LTe(h.href,o.url))return;Object.assign(h.headers??(h.headers={}),f)}}function LTe(o,f){if(!o||!f)return!1;try{return new URL(o).origin===new URL(f).origin}catch{return!1}}async function NTe(o){try{return await az.buildHeadersForDestination(o)}catch(f){throw new Lm.ErrorWithCause("Failed to build headers.",f)}}function jTe(o,f){return{...o,...f,headers:{...o.headers,...f.headers}}}function MTe(o){return{...NU(),...o}}function LU(o){return xTe.default.request(MTe(o))}function NU(){return{...jU(),method:"get"}}function jU(){return{httpAgent:yTe.globalAgent,httpsAgent:bTe.globalAgent,timeout:0,paramsSerializer:{serialize:(o={})=>Object.entries(o).map(([f,h])=>`${f}=${h}`).join("&")}}}function lz(){return{method:"get"}}function uz(){return{fetchCsrfToken:!0}}var qTe=function(o){return Object.fromEntries(Object.entries(o).map(([f,h])=>[encodeURIComponent(f),encodeURIComponent(h)]))};Nt.encodeAllParameters=qTe});var pz=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 FTe=nf();Object.defineProperty(pi,"csrf",{enumerable:!0,get:function(){return FTe.csrf}});var UTe=RA();Object.defineProperty(pi,"compress",{enumerable:!0,get:function(){return UTe.compress}});var Nm=dz();Object.defineProperty(pi,"buildHttpRequest",{enumerable:!0,get:function(){return Nm.buildHttpRequest}});Object.defineProperty(pi,"encodeAllParameters",{enumerable:!0,get:function(){return Nm.encodeAllParameters}});Object.defineProperty(pi,"executeHttpRequest",{enumerable:!0,get:function(){return Nm.executeHttpRequest}});Object.defineProperty(pi,"executeHttpRequestWithOrigin",{enumerable:!0,get:function(){return Nm.executeHttpRequestWithOrigin}});var $Te=Dm();Object.defineProperty(pi,"defaultDisallowedKeys",{enumerable:!0,get:function(){return $Te.defaultDisallowedKeys}})});var FU=i(function(Hn){var rke=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]}),Mm=Hn&&Hn.__exportStar||function(o,f){for(var h in o)if(h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h))rke(f,o,h)};Object.defineProperty(Hn,"__esModule",{value:!0});Mm(nf(),Hn);Mm(dz(),Hn);Mm(oz(),Hn);Mm(Dm(),Hn)});var WU=i(function(GU){Object.defineProperty(GU,"__esModule",{value:!0});GU.OpenApiRequestBuilder=void 0;var os=se(),oke=Am(),$U=Pm(),nke=pz(),ike=FU(),UU=os.createLogger({package:"openapi",messageContext:"openapi-request-builder"});class VU{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((C)=>C.type.toLowerCase())),z=h instanceof Blob?this.encodeBlob({key:f,value:h},y):this.encodeString({key:f,value:h},y,x);o.append(f,z)}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:z}=h,C=new Set(z.map((E)=>E.type.toLowerCase())),w=this.checkIsFlexibleContentType(h,C);if(!f.type&&!w&&!Object.keys(z[0].parameters).length)return UU.debug(`Adding missing content type '${y}' to Blob for key '${o}' as per encoding specification.`),new Blob([f],{type:y});let S=f.type.split(";")[0].trim();if(!x&&!w&&S.toLowerCase()!==y.toLowerCase())UU.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),z=os.unique(h.parsedContentTypes.map((k)=>k.parameters.charset));if(z.length!==1||!z[0])return x;let C=z[0],w;try{w=Buffer.from(x,C)}catch(k){throw new os.ErrorWithCause(`Failed to encode form data field '${o}' with charset '${C}'.`,k)}let E=!this.checkIsFlexibleContentType(h,y)?{type:h.contentType}:void 0;return new Blob([w],E)}}class HU{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 oke.useOrFetchDestination(o);if(os.isNullish(o))throw Error($U.noDestinationErrorMessage(o));return $U.assertHttpDestination(h),nke.executeHttpRequest(h,await this.requestConfig(),{fetchCsrfToken:f})}async execute(o){let f=await this.executeRaw(o);if(ske(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()},...ike.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 VU(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),z=o[x];return h.replace(y,encodeURIComponent(z))},this.pathPattern)}}GU.OpenApiRequestBuilder=HU;function ske(o){return"data"in o}});var JU=i(function(hz){Object.defineProperty(hz,"__esModule",{value:!0});hz.OpenApiRequestBuilder=void 0;var ake=WU();Object.defineProperty(hz,"OpenApiRequestBuilder",{enumerable:!0,get:function(){return ake.OpenApiRequestBuilder}})});function ma(o){return typeof o==="object"&&!Array.isArray(o)&&(("id"in o)||("scenario"in o)&&("name"in o)&&("version"in o))}function Ed(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 rg(o){try{return Ed(o),!0}catch{return!1}}var og={ALLOW_SAFE:0,ALLOW_SAFE_LOW:2,ALLOW_SAFE_LOW_MEDIUM:4,ALLOW_ALL:6};var qR=v(se(),1),Hre=qR.createLogger({package:"orchestration",messageContext:"orchestration-stream-response"});class Js{_openStream=!0;_data={};_stream;_rawResponse;constructor(o){if(!o){Hre.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 Xs{_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 qU=v(pz(),1),Ao=v(se(),1);import{Readable as ZTe}from"node:stream";import{json as YTe}from"node:stream/consumers";var rs=v(Am(),1),MU=v(se(),1),HTe=MU.createLogger({package:"core",messageContext:"context"}),GTe=1201000,KTe=!1,jm;async function fz(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(!jm){if(jm=WTe()||rs.getServiceBinding("aicore"),!jm)throw Error("Could not find service credentials for AI Core. Please check the service binding.")}let f=await rs.transformServiceBindingToDestination(jm,{useCache:!0});return{...f,agentOptions:{keepAlive:KTe,timeout:GTe,...f.agentOptions}}}function WTe(){let o=JTe(process.env.AICORE_SERVICE_KEY);if(o)return HTe.debug('Found a service key in environment variable "AICORE_SERVICE_KEY".'),{credentials:o,label:"aicore",name:"aicore",tags:["aicore"]}}function JTe(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 XTe(o,f){if(f instanceof Set)return[...f];if(f instanceof Map)return Object.fromEntries(f);return f}async function pa(o,f,h,y){let x=await fz(y),{url:z,apiVersion:C,resourceGroup:w="default"}=o,S={...eke(C,w,h),data:f instanceof FormData||f instanceof Blob?f:JSON.stringify(f,XTe)};try{return await qU.executeHttpRequest({...x,url:tke(x.url,z)},S,{fetchCsrfToken:!1})}catch(E){if(h?.signal?.aborted)throw new Ao.ErrorWithCause("Request aborted.",E);throw await QTe(E),new Ao.ErrorWithCause(`Request failed with status code ${E.status}.`,E)}}async function QTe(o){if(o.response?.data&&o.config.responseType==="stream"){let f=ZTe.from(o.response.data);o.response.data=await YTe(f)}}function eke(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=Ao.mergeIgnoreCase(y.headers,h?.headers),z=["AI SDK JavaScript",Ao.pickValueIgnoreCase(h?.headers,"ai-client-type")].filter(Boolean).join(", ");return{...y,...h,headers:{...Ao.mergeIgnoreCase(x,{"ai-client-type":z})},params:Ao.mergeIgnoreCase(y.params,h?.params)}}function tke(o,f){if(o=Ao.removeTrailingSlashes(o),f=Ao.removeLeadingSlashes(f),new URL(o).pathname==="/")return o+"/v2/"+f;return o+"/"+f}var ZU=v(JU(),1);class zt extends ZU.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 pa({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 mz=v(se(),1);class qc{static NEWLINE_CHARS=new Set([`
178
+ `,"\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=qc.NEWLINE_CHARS.has(f.at(-1)||""),y=f.split(qc.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 qm{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 z={event:this.event,data:this.data.join(`
179
+ `),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],z}if(this.chunks.push(o),o.startsWith(":"))return null;let[f,h,y]=lke(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 lke(o,f){let h=o.indexOf(f);if(h!==-1)return[o.substring(0,h),f,o.substring(h+f.length)];return[o,"",""]}class qo{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 z of uke(o,f)){if(x)continue;if(z.data.startsWith("[DONE]")){x=!0;continue}let C;try{C=JSON.parse(z.data)}catch(w){throw new mz.ErrorWithCause(`Server sent an unexpected non-JSON response: ${z.data.length>256?z.data.slice(0,256)+"...":z.data}`,w)}if(C?.error)throw Error(`Error received from the server.
180
+ ${JSON.stringify(C.error)}`);yield z.event===null?C:{event:z.event,data:C}}x=!0}catch(z){if(z instanceof Error&&z.name==="CanceledError")return;throw new mz.ErrorWithCause("Error while iterating over SSE stream.",z)}finally{if(!x)f.abort()}}return new qo(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(z){try{let{value:C,done:w}=await o.next();if(w){z.close();return}z.enqueue(f.encode(JSON.stringify(C)+`
181
+ `))}catch(C){await x(),z.error(C)}},async cancel(){await x()}})}}async function*uke(o,f){if(!o.data)throw f.abort(),Error("Attempted to iterate over a response with no body");let h=new qm,y=new qc,x=o.data;for await(let z of dke(x))for(let C of y.decode(z)){let w=h.decode(C);if(w)yield w}for(let z of y.flush()){let C=h.decode(z);if(C)yield C}}async function*dke(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 z;while((z=pke(f))!==-1)yield f.slice(0,z),f=f.slice(z)}if(f.length)yield f}function pke(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 p6=v(se(),1);function od(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,...z}=f;return{type:"azure_content_safety",config:{...Object.fromEntries(Object.entries(z).map(([C,w])=>[C,og[w]])),...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,z])=>[x,og[z]])),...h!==void 0&&{protected_material_code:h}}}}function rd(o,f){return{type:"llama_guard_3_8b",config:Object.fromEntries([...f].map((h)=>[h,!0]))}}function sd(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 QU=v(se(),1);var Fm=QU.createLogger({package:"orchestration",messageContext:"orchestration-utils"});function e6(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 t6(o,f,h){let y=[...f?.messagesHistory||[],...f?.messages||[]],{overrideConfig:x,...z}=o,C={...x,stream:{...x?.stream,enabled:h===!0}};return{config_ref:z,config:C,...f?.placeholderValues&&{placeholder_values:f.placeholderValues},...y.length&&{messages_history:y}}}function fke(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 hke(o,f){return{...o,stream_options:{...o.stream_options,...f}}}function mke(o,f){let h=Object.keys(o?.overrides||[]);if(!h.length)return;let y=h.filter((x)=>{let z=parseFloat(x);return!Number.isInteger(z)||z<0||z>=f});if(y.length)Fm.debug(`The following override keys do not correspond to any module configuration and will be ignored: ${y.join(", ")}.`)}function gke(o,f){if(!Array.isArray(o?.overrides)||!o.overrides.length)return;let h=o.overrides.length;Fm.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 r6(o,f){if(!o)return;let{global:h,overrides:y,...x}=o;return y&&y[f]||x}function yke(o,f){let h=Array.isArray(o)?o:[o],y=h.map((x,z)=>{if(r6(f,z)?.outputFiltering&&!x.filtering?.output)return z;return}).filter((x)=>x!==void 0);if(y.length===0)return;if(y.length===h.length)Fm.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",z=y.map((C)=>`#${C+1}`).join(", ");Fm.warn(`Output filter stream options will not be applied to ${x} ${z} because output filtering is not configured for those modules.`)}}function bke(o,f){return o.map((h,y)=>{let x=r6(f,y);return vke(h,x)})}function YU(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.");mke(f,h.length),gke(f,h.length),yke(o,f);let y=bke(h,f);return{stream:{enabled:!0,...f?.global},modules:Array.isArray(o)?y:y[0]}}function vke(o,f){let{prompt_templating:h,filtering:y}=o,x=f?.outputFiltering;return{...o,prompt_templating:fke(h,f),...x&&y?.output&&{filtering:{...y,output:hke(y.output,x)}}}}function gz(o,f,h,y){let z=(Array.isArray(o)?o:[o]).some((T)=>zke(T?.promptTemplating?.prompt||{})),C=z&&f?{...f,messages:void 0}:f,w=Array.isArray(o)?o.map((T)=>XU(T,C)):XU(o,C),S=h?Array.isArray(w)?YU(w,y):YU(w,y):{modules:w},E=z&&f?.messages?.length?[...f.messagesHistory||[],...f.messages]:f?.messagesHistory;return{config:S,...f?.placeholderValues&&{placeholder_values:f.placeholderValues},...E&&{messages_history:E}}}function xke(o,f){if(typeof o.prompt==="string")throw TypeError("Prompt must be parsed before merging with messages.");let h=o.prompt??{template:[]};if(_ke(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 XU(o,f){let{promptTemplating:h,filtering:y,masking:x,grounding:z,translation:C}=o,w=xke(h,f?.messages);return{prompt_templating:{...h,prompt:w},...y&&Object.keys(y).length&&{filtering:y},...x&&Object.keys(x).length&&{masking:x},...z&&Object.keys(z).length&&{grounding:z},...C&&Object.keys(C).length&&{translation:C}}}function _ke(o){return!!o&&typeof o==="object"&&!("template_ref"in o)}function zke(o){return!!o&&typeof o==="object"&&"template_ref"in o}function o6(o,f){return{config:{modules:Cke(o)},input:{text:f.input,...f.type&&{type:f.type}}}}function Cke(o){let{embeddings:f,masking:h}=o,{model:y}=f,{name:x,version:z,params:C}=y;return{embeddings:{model:{name:x,...z&&{version:z},...C&&{params:C}}},...h&&Object.keys(h).length&&{masking:h}}}function cd(o){let{method:f,mask_grounding_input:h,entities:y,allowlist:x}=o;return{type:"sap_data_privacy_integration",method:f,entities:y.map((z)=>{if(typeof z==="string")return{type:z};return z.type==="custom"?(({type:C,...w})=>w)(z):z}),...h!==void 0&&{mask_grounding_input:{enabled:h}},...x&&{allowlist:x}}}function n6(o){return{category:o.category,items:o.items,...o.sourceLanguage&&{source_language:o.sourceLanguage}}}function ld(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(n6)}}}}return{type:"sap_document_translation",config:{...f.sourceLanguage&&{source_language:f.sourceLanguage},target_language:typeof f.targetLanguage==="string"?f.targetLanguage:n6(f.targetLanguage)}}}var i6=v(se(),1),xd=i6.createLogger({package:"orchestration",messageContext:"stream-util"});function s6(o,f){let h=o._data;h.request_id=f.request_id,h.intermediate_results=a6(h.intermediate_results,f.intermediate_results),h.intermediate_failures=wke(h.intermediate_failures,f.intermediate_failures),h.final_result=c6(h.final_result,f.final_result)}function wke(o,f){if(!f||f.length===0)return o;let h=f.map((z)=>({...z,intermediate_results:z.intermediate_results?a6(void 0,z.intermediate_results):void 0}));if(!o||o.length===0)return h;let y=new Set(o.map((z)=>JSON.stringify([z.request_id,z.code,z.message]))),x=h.filter((z)=>!y.has(JSON.stringify([z.request_id,z.code,z.message])));return[...o,...x]}function a6(o,f){let h={...o};for(let[y,x]of Object.entries(f||{}))switch(y){case"llm":h[y]=c6(h[y],x);break;case"output_unmasking":h[y]=l6(h[y],x);break;default:h[y]=x}return h}function c6(o,f){if(!f)return o;return{...f,usage:Ske(o?.usage,f.usage),choices:l6(o?.choices,f?.choices)}}function Ske(o,f){if(f)xd.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 l6(o,f){let h=[...o??[]];for(let y of f??[]){let x=h.find((z)=>z.index===y.index);if(x)x.finish_reason=Ike(x.finish_reason,y.finish_reason,y.index),x.logprobs=Oke(x.logprobs,y.logprobs),x.message=Eke(x.message,y.delta);else h.push(Rke(y))}return h}function Eke(o,f){if(!f)return o;return{role:o.role,content:o.content+(f.content??""),tool_calls:Tke(o.tool_calls,f.tool_calls),refusal:f.refusal??o.refusal,reasoning_content:kke(o.reasoning_content,f.reasoning_content)}}function Tke(o,f){if(!f||f.length===0)return o;if(!o||o.length===0)return u6(f);let h=[...o];for(let y of f){let x=h.find((z)=>z.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(d6(y))}return h}function kke(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,z)=>({content:(o[z].content??"")+(x.content??""),signature:x.signature||o[z].signature}));if(f.length>o.length)return[...y,...f.slice(h)];if(o.length>f.length)return[...y,...o.slice(h)];return y}function Oke(o,f){if(!f)return o;if(!o)return f;return{content:[...o.content??[],...f.content??[]],refusal:[...o.refusal??[],...f.refusal??[]]}}function Ike(o,f,h){if(!f)return o??"";switch(f){case"content_filter":xd.error(`Choice ${h}: Stream finished with content filter hit.`);break;case"length":xd.error(`Choice ${h}: Stream finished with token length exceeded.`);break;case"stop":case"tool_calls":case"function_call":xd.debug(`Choice ${h}: Stream finished.`);break;default:xd.error(`Choice ${h}: Stream finished with unknown reason '${f}'.`)}return f}function Rke(o){return{index:o.index,message:{role:"assistant",content:o.delta.content,tool_calls:u6(o.delta.tool_calls),refusal:o.delta.refusal,reasoning_content:o.delta.reasoning_content},finish_reason:o.finish_reason??"",logprobs:o.logprobs}}function u6(o){if(!o||o.length===0)return;return o?.map((f)=>d6(f))}function d6(o){return{index:o.index,id:o.id??"",type:o.type??"function",function:{name:o.function?.name??"",arguments:o.function?.arguments??""}}}var Ake=p6.createLogger({package:"orchestration",messageContext:"orchestration-stream"});class bi extends qo{static _create(o,f){let h=qo.transformToSseStream(o,f);return new bi(h.iterator,f)}static async*_processChunk(o){for await(let f of o)yield new Xs(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)s6(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)Ake.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 bi(()=>o(this,f),this.controller);return new bi(()=>o(this),this.controller)}toContentStream(){return new bi(()=>bi._processContentStream(this),this.controller)}}var g6=v(se(),1);var Gn={_defaultBasePath:void 0,deploymentQuery:(o,f)=>new zt("get","/lm/deployments",{headerParameters:f,queryParameters:o},Gn._defaultBasePath),deploymentCreate:(o,f)=>new zt("post","/lm/deployments",{body:o,headerParameters:{"content-type":"application/json",...f}},Gn._defaultBasePath),deploymentBatchModify:(o,f)=>new zt("patch","/lm/deployments",{body:o,headerParameters:{"content-type":"application/merge-patch+json",...f}},Gn._defaultBasePath),deploymentGet:(o,f,h)=>new zt("get","/lm/deployments/{deploymentId}",{pathParameters:{deploymentId:o},headerParameters:h,queryParameters:f},Gn._defaultBasePath),deploymentModify:(o,f,h)=>new zt("patch","/lm/deployments/{deploymentId}",{pathParameters:{deploymentId:o},body:f,headerParameters:{"content-type":"application/json",...h}},Gn._defaultBasePath),deploymentDelete:(o,f)=>new zt("delete","/lm/deployments/{deploymentId}",{pathParameters:{deploymentId:o},headerParameters:f},Gn._defaultBasePath),deploymentCount:(o,f)=>new zt("get","/lm/deployments/$count",{headerParameters:f,queryParameters:o},Gn._defaultBasePath),kubesubmitV4DeploymentsGetLogs:(o,f,h)=>new zt("get","/lm/deployments/{deploymentId}/logs",{pathParameters:{deploymentId:o},headerParameters:h,queryParameters:f},Gn._defaultBasePath)};var m6=v(Pm(),1);function Pke(o){return typeof o==="object"&&"name"in o}function _d(o){let f=o.details?.resources?.backendDetails?.model;if(Pke(f))return f}function f6(o){if(typeof o==="string")return{name:o};return{name:o.modelName,...o.modelVersion&&{version:o.modelVersion}}}function yz({scenarioId:o,executableId:f="",model:h,resourceGroup:y="default"}){return`${o}:${f}:${h?.name??""}:${h?.version??""}:${y}`}function Dke(o){return{get:(f)=>o.get(yz(f)),set:(f,h)=>{o.set(yz(f),{entry:h6(h)})},setAll:(f,h)=>{[...h].reverse().map((y)=>h6(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(yz({...f,model:y.model}),{entry:y})})},clear:()=>o.clear()}}function h6(o){return{id:o.id,url:o.url,model:_d(o)}}var bz=Dke(new m6.Cache(300000));function nu(o){return typeof o==="object"?o.resourceGroup:void 0}async function Bke(o){let{model:f}=o,h=await Lke(o);if(f){if(h=h.filter((y)=>_d(y)?.name===f.name),f.version)h=h.filter((y)=>_d(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 y6(o){return typeof o==="object"&&"deploymentId"in o}async function b6(o){let f=bz.get(o);if(f?.id)return f.id;return(await Bke(o)).id}async function Lke(o){let{destination:f,scenarioId:h,executableId:y,resourceGroup:x="default"}=o;try{let{resources:z}=await Gn.deploymentQuery({scenarioId:h,status:"RUNNING",...y&&{executableIds:[y]}},{"AI-Resource-Group":x}).execute(f);return bz.setAll(o,z),z}catch(z){throw new g6.ErrorWithCause("Failed to fetch the list of deployments.",z)}}async function ud(o,f,h){if(y6(o))return o.deploymentId;return b6({scenarioId:"foundation-models",executableId:f,model:f6(o),resourceGroup:nu(o),destination:h})}async function Um(o,f){if(y6(o))return o.deploymentId;return b6({scenarioId:"orchestration",...o,destination:f})}var zn=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){sa(this,"with",o)},parse(o,f){return El(this,o,f,{callee:this.parse})},parseAsync(o,f){return Rl(this,o,f,{callee:this.parseAsync})},safeParse(o,f){return Al(this,o,f)},safeParseAsync(o,f){return Py(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 Ie(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)}}),jke=g("ZodMiniString",(o,f)=>{qr.init(o,f),zn.init(o,f)});function Vr(o){return Wp(jke,o)}var Mke=g("ZodMiniBoolean",(o,f)=>{kc.init(o,f),zn.init(o,f)});function vz(o){return Fp(Mke,o)}var qke=g("ZodMiniUnknown",(o,f)=>{Sp.init(o,f),zn.init(o,f)});function $m(){return jp(qke)}var Fke=g("ZodMiniArray",(o,f)=>{Ep.init(o,f),zn.init(o,f)});function Vm(o,f){return new Fke({type:"array",element:o,..._(f)})}var x6=g("ZodMiniObject",(o,f)=>{nh.init(o,f),zn.init(o,f),ih(o,"shape",(h)=>h._zod.def.shape,!1)});function Co(o,f){let h={type:"object",shape:o??{},..._(f)};return new x6(h)}function Hm(o,f){return new x6({type:"object",shape:o,catchall:$m(),..._(f)})}function _6(o,f){return o.clone(Ot(o._zod.def,{catchall:f}))}var Uke=g("ZodMiniUnion",(o,f)=>{Ic.init(o,f),zn.init(o,f)});function Gm(o,f){return new Uke({type:"union",options:o,..._(f)})}var v6=g("ZodMiniRecord",(o,f)=>{Rp.init(o,f),zn.init(o,f)});function xz(o,f,h){if(!f||!f._zod)return new v6({type:"record",keyType:Vr(),valueType:o,..._(f)});return new v6({type:"record",keyType:o,valueType:f,..._(h)})}var $ke=g("ZodMiniEnum",(o,f)=>{Ap.init(o,f),zn.init(o,f),o.options=[...o._zod.values]});function da(o,f){let h=Array.isArray(o)?Object.fromEntries(o.map((y)=>[y,y])):o;return new $ke({type:"enum",entries:h,..._(f)})}var Vke=g("ZodMiniOptional",(o,f)=>{Ol.init(o,f),zn.init(o,f)});function Kn(o){return new Vke({type:"optional",innerType:o})}var Hke=g("ZodMiniNullable",(o,f)=>{Op.init(o,f),zn.init(o,f)});function Gke(o){return new Hke({type:"nullable",innerType:o})}function _z(o){return Kn(Gke(o))}var Kke=g("ZodMiniDefault",(o,f)=>{Cp.init(o,f),zn.init(o,f)});function Km(o,f){return new Kke({type:"default",innerType:o,get defaultValue(){return typeof f==="function"?f():$r(f)}})}var Zr=$p;var Zke=120,Yke=new RegExp("^[a-zA-Z0-9_-]+$"),Xke=10,Qke=new RegExp("^[a-zA-Z0-9._-]+$"),eOe=120,tOe=new RegExp("^[a-zA-Z0-9_-]+$"),rOe="auto",oOe=64,nOe=new RegExp("^[a-zA-Z0-9-_]+$"),iOe=!1,sOe=64,aOe=new RegExp("^[a-zA-Z0-9-_]+$"),cOe=!1,w6=Co({name:Vr().check(Li(Zke)).check(an(Yke)),version:Vr().check(Li(Xke)).check(an(Qke)),scenario:Vr().check(Li(eOe)).check(an(tOe)),spec:_6(Co({template:Vm(Gm([Co({role:Vr(),content:Vr()}),Co({role:Vr(),content:Vm(Gm([Co({type:da(["image_url"]),image_url:Co({url:Vr(),detail:Km(Vr(),rOe)})}),Co({type:da(["text"]),text:Vr()})]))})])),defaults:Kn(Hm({})),additionalFields:Kn(Hm({})).check(Zr(`DEPRECATED. Please use additional_fields instead.
182
+ `)),response_format:Kn(Gm([Co({type:da(["text"]).check(Zr("The type of response format being defined: `text`"))}),Co({type:da(["json_object"]).check(Zr("The type of response format being defined: `json_object`"))}),Co({type:da(["json_schema"]).check(Zr("The type of response format being defined: `json_schema`")),json_schema:Co({description:Kn(Vr()).check(Zr("A description of what the response format is for, used by the model to determine how to respond in the format.")),name:Vr().check(Li(oOe)).check(an(nOe)).check(Zr("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:Kn(xz(Vr(),$m())).check(Zr("The schema for the response format, described as a JSON Schema object.")),strict:Km(_z(vz()),iOe).check(Zr("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(Zr(`Response format that the model output should adhere to. This is the same as the OpenAI definition.
183
+ Compatible with GPT-4o, GPT-4o mini, GPT-4 (Turbo) and all GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106.
184
+ `)),tools:Kn(Vm(Co({type:da(["function"]).check(Zr("The type of the tool. Currently, only `function` is supported.")),function:Co({description:Kn(Vr()).check(Zr("A description of what the function does, used by the model to choose when and how to call the function.")),name:Vr().check(Li(sOe)).check(an(aOe)).check(Zr("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:Kn(xz(Vr(),$m())).check(Zr("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:Km(_z(vz()),cOe).check(Zr("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(Zr(`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.
185
+ `))}),Hm({}))});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 EHe=new RegExp("^[a-zA-Z0-9-_]+$");var THe=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 DHe=new RegExp("^[a-zA-Z0-9-_]+$");var BHe=new RegExp("^[a-zA-Z0-9-_]+$");var LHe=new RegExp("^[a-zA-Z0-9-_]+$");var NHe=new RegExp("^[a-zA-Z0-9-_]+$");var jHe=new RegExp("^[a-zA-Z0-9-_]+$");var MHe=new RegExp("^[a-zA-Z0-9-_]+$");var qHe=new RegExp("^[a-zA-Z0-9-_]+$");var FHe=new RegExp("^[a-zA-Z0-9-_]+$");var UHe=new RegExp("^[a-zA-Z0-9-_]+$");var $He=new RegExp("^[a-zA-Z0-9-_]+$");var VHe=new RegExp("^[a-zA-Z0-9-_]+$");var HHe=new RegExp("^[a-zA-Z0-9-_]+$");var GHe=new RegExp("^[a-zA-Z0-9-_]+$");var KHe=new RegExp("^[a-zA-Z0-9-_]+$");var WHe=new RegExp("^[a-zA-Z0-9-_]+$");var JHe=new RegExp("^[a-zA-Z0-9-_]+$");var S6=v(se(),1);class Zs{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 Fc=S6.createLogger({package:"orchestration",messageContext:"orchestration-client"});class pd{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))Ed(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)Fc.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 Zs(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)Fc.warn("Stream options are not supported when using a JSON module config.");if(ma(this.config)){if(h)Fc.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)Fc.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(z){throw x.abort(),z}}async executeRequest(o){let{request:f,requestConfig:h,stream:y,streamOptions:x}=o,z=typeof this.config==="string"?e6(JSON.parse(this.config),f,y):ma(this.config)?t6(this.config,f,y):rg(this.config)?gz(this.config,f,y,x):gz(this.config,f,y,x),C=await Um(this.deploymentConfig||{},this.destination);if(!C)throw Error("Failed to resolve deployment ID");let w=await pa({url:`/inference/deployments/${C}/v2/completion`,...this.deploymentConfig},z,h,this.destination);if(w.data?.intermediate_failures){let S=w.data.intermediate_failures.length,E=w.data.final_result?.model;Fc.info(`Orchestration used ${S} fallback(s) before success${E?`. Succeeded with model: ${E}`:""}.`)}return w}async createStreamResponse(o,f){let h=await this.executeRequest({...o,requestConfig:{...o.requestConfig,responseType:"stream",signal:f.signal}}),y=new Js(h),x=bi._create(h,f);return y.stream=x._pipe(bi._processChunk)._pipe(bi._processOrchestrationStreamChunkResponse,y)._pipe(bi._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(w){throw Error(`Error parsing YAML: ${String(w)}`,{cause:w})}let h=w6.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:z,tools:C}=h.data.spec;return{...o,promptTemplating:{...o.promptTemplating,prompt:{template:y,...x&&{defaults:x},...z&&{response_format:z},...C&&{tools:C}}}}}parseTemplatingModule(o){return typeof o.promptTemplating.prompt==="string"?this.parseAndMergeTemplating(o):o}parseModuleConfigList(o){Ed(o);let f=o.map((x)=>this.parseTemplatingModule(x)),h=f.map((x)=>x.promptTemplating.model.name);if(new Set(h).size<h.length)Fc.warn(`Fallback configurations contain duplicate models: [${h.join(", ")}]. Consider using different models for meaningful fallback behavior.`);return f}}class ec{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 dd{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 ec(h)}async executeRequest(o,f){let h=o6(this.config,o),y=await Um(this.deploymentConfig||{},this.destination);if(!y)throw Error("Failed to resolve deployment ID");return pa({url:`/inference/deployments/${y}/v2/embeddings`,...this.deploymentConfig},h,f,this.destination)}}import{createRequire as lOe}from"module";var A6=v(se(),1),R7e=lOe(import.meta.url),Bh="sap-ai";function mo(o){let f=o.indexOf(".");return f===-1?o:o.slice(0,f)}var wz=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()),T6=t({dimensions:n().int().positive().optional(),encoding_format:s(["base64","binary","float"]).optional(),normalize:r().optional()}).catchall(m());function V2(o){return T6.parse(o)}function id(o){return wz.parse(o)}function K2(o,f){let h=wz.safeParse(o);if(!h.success)for(let y of h.error.issues){let x=y.path.join("."),z=x?o[x]:void 0;f.push({message:`${x}=${String(z)} is invalid: ${y.message}. The API may reject this value.`,type:"other"})}}var k6=s(["orchestration","foundation-models"]),uOe=t({ttl:s(["5m","1h"]).optional(),type:a("ephemeral")}),dOe=t({cacheControl:uOe.optional()});function Fh(o,f){if(!o||typeof o!=="object")return;let h=o[Bh];if(h===void 0)return;let y=dOe.safeParse(h);if(y.success)return y.data;if(f)for(let x of y.error.issues){let z=x.path.join("."),C=`providerOptions['sap-ai']${z?`.${z}`:""} is invalid: ${x.message}. The directive was dropped.`;if(!f.some((w)=>w.message===C))f.push({message:C,type:"other"})}return}var O6=s(["tenant","resource_group"]),pOe=t({id:e().min(1,"Template ID cannot be empty"),scope:O6.optional()}),fOe=t({name:e().min(1,"Template name cannot be empty"),scenario:e().min(1,"Scenario cannot be empty"),scope:O6.optional(),version:e().min(1,"Version cannot be empty")}),hOe=p([pOe,fOe]),I6=J((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())"}),mOe=t({id:e().min(1,"Config ID cannot be empty"),overrideConfig:I6.optional()}),gOe=t({name:e().min(1,"Config name cannot be empty"),overrideConfig:I6.optional(),scenario:e().min(1,"Scenario cannot be empty"),version:e().min(1,"Version cannot be empty")}),jh=p([mOe,gOe]),$h=u(()=>l(t({api:k6.optional(),escapeTemplatePlaceholders:r().optional(),includeReasoning:r().optional(),modelParams:wz.optional(),orchestrationConfigRef:jh.optional(),placeholderValues:d(e(),e()).optional(),promptTemplateRef:hOe.optional()}))),qh=u(()=>l(t({api:k6.optional(),modelParams:T6.optional(),type:s(["document","query","text"]).optional()}))),yOe=100;function ho(...o){let f={};for(let h of o)if(h!=null)R6(f,h,new Set,0);return f}function E6(o){if(o===null||typeof o!=="object")return!1;let f=Object.getPrototypeOf(o);return f===Object.prototype||f===null}function R6(o,f,h,y){if(y>yOe)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 z=f[x],C=Object.hasOwn(o,x)?o[x]:void 0,w=E6(z)?R6(E6(C)?C:{},z,h,y+1):z;Object.defineProperty(o,x,{configurable:!0,enumerable:!0,value:w,writable:!0})}return h.delete(f),o}var Zt={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},bOe=[{category:"network",isRetryable:!0,keywords:["econnrefused","enotfound","network","timeout"],statusCode:Zt.SERVICE_UNAVAILABLE},{category:"destination",isRetryable:!1,keywords:["could not resolve destination"],message:(o)=>`SAP AI Core destination error: ${o}
186
+
187
+ Check your destination configuration or provide a valid destinationName.`,statusCode:Zt.BAD_REQUEST},{category:"content filtered",isRetryable:!1,keywords:["filtered by the output filter"],message:(o)=>`Content was filtered: ${o}
188
+
189
+ The model's response was blocked by content safety filters. Try a different prompt.`,statusCode:Zt.BAD_REQUEST},{category:"stream consumption",isRetryable:!1,keywords:["consumed stream"],statusCode:Zt.INTERNAL_ERROR},{category:"streaming",isRetryable:!0,keywords:["iterating over","parse message into json","received from","no body","invalid sse payload"],statusCode:Zt.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:Zt.BAD_REQUEST},{category:"environment",isRetryable:!1,keywords:["buffer is not available as globals"],statusCode:Zt.INTERNAL_ERROR},{category:"response stream",isRetryable:!1,keywords:["response stream is undefined"],statusCode:Zt.INTERNAL_ERROR},{category:"response processing",isRetryable:!0,keywords:["response is required to process","stream is still open","data is not available yet"],statusCode:Zt.INTERNAL_ERROR},{category:"deployment retrieval",isRetryable:!0,keywords:["failed to fetch the list of deployments"],statusCode:Zt.SERVICE_UNAVAILABLE},{category:"stream buffer",isRetryable:!1,keywords:["received non-uint8array"],statusCode:Zt.INTERNAL_ERROR}],vOe=["authentication","unauthorized","aicore_service_key","invalid credentials","service credentials","service binding"],xOe=["failed to resolve deployment","no deployment matched"],tu=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},Hs=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 _Oe(o,f){let{code:h,location:y,message:x,requestId:z}=zOe(o),C=wOe(h,f?.httpStatusCode),w=JSON.stringify({error:{code:h,location:y,message:x,request_id:z}}),S=x;if(C===Zt.UNAUTHORIZED||C===Zt.FORBIDDEN){if(S+=`
190
+
191
+ Authentication failed. Verify your AICORE_SERVICE_KEY environment variable is set correctly.
192
+ See: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/create-service-key`,z)S+=`
193
+ Request ID: ${z}`;return new It({message:S})}if(C===Zt.NOT_FOUND){if(S+=`
194
+
195
+ Resource not found. The model or deployment may not exist in your SAP AI Core instance.
196
+ See: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/create-deployment-for-orchestration`,z)S+=`
197
+ Request ID: ${z}`;let E=f?.modelId??P6(x,y);return new we({message:S,modelId:E??"unknown",modelType:f?.modelType??"languageModel"})}if(C===Zt.RATE_LIMIT)S+=`
198
+
199
+ Rate limit exceeded. Please try again later or contact your SAP administrator.
200
+ See: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/rate-limits`;else if(C>=Zt.INTERNAL_ERROR)S+=`
201
+
202
+ SAP AI Core service error. This is typically a temporary issue. Retries depend on the caller's retry configuration.
203
+ See: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/troubleshooting`;else if(y)S+=`
204
+
205
+ Error location: ${y}`;if(z)S+=`
206
+ Request ID: ${z}`;return new N({isRetryable:Cz(C),message:S,requestBodyValues:f?.requestBody,responseBody:w,responseHeaders:f?.responseHeaders,statusCode:C,url:f?.url??""})}function Qs(o,f){if(N.isInstance(o)||It.isInstance(o)||we.isInstance(o)||ni.isInstance(o)||b.isInstance(o))return o;let{aborted:h,response:y,rootError:x}=SOe(o),z=f?.responseHeaders??Ys(y?.headers);if(!h){let E=COe(x instanceof SyntaxError?void 0:x,y?.data);if(E)return _Oe(E,{...f,httpStatusCode:y?.status??f?.httpStatusCode,responseHeaders:z})}let C={...f,responseBody:TOe(y?.data),responseHeaders:z};if(h)return Uc(o,{isRetryable:!1,message:"Request was aborted by the client",statusCode:Zt.CLIENT_CLOSED_REQUEST},C);if(Wm(y?.status))return Uc(o,{isRetryable:Cz(y.status),message:x instanceof SyntaxError&&o instanceof Error?o.message:x instanceof Error?x.message:"SAP AI Core request failed",statusCode:y.status},C);if(x instanceof SyntaxError)return Uc(o,{isRetryable:!1,message:o instanceof Error&&o!==x?o.message:"Failed to parse SAP AI Core data.",statusCode:Zt.INTERNAL_ERROR},C);if(x instanceof Error){let E=x.message.toLowerCase(),T=x.message;if(vOe.some((R)=>E.includes(R)))return new It({message:`SAP AI Core authentication failed: ${T}
207
+
208
+ Make sure your AICORE_SERVICE_KEY environment variable is set correctly.
209
+ See: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/create-service-key`});if(xOe.some((R)=>E.includes(R))){let R=f?.modelId??P6(T);return new we({message:`SAP AI Core deployment error: ${T}
210
+
211
+ Make sure you have a running orchestration deployment in your SAP AI Core instance.
212
+ 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(T),O=k?.[1]?Number.parseInt(k[1],10):void 0;if(Wm(O))return Uc(o,{isRetryable:Cz(O),message:`SAP AI Core request failed: ${T}`,statusCode:O},C);for(let R of bOe)if(R.keywords.some((I)=>E.includes(I))){let I="message"in R?R.message(T):`SAP AI Core ${R.category} error: ${T}`;return Uc(o,{isRetryable:R.isRetryable,message:I,statusCode:R.statusCode},C)}}let w=x instanceof Error?x.message:typeof x==="string"?x:"Unknown error occurred",S=f?.operation?`SAP AI Core ${f.operation} failed: ${w}`:`SAP AI Core error: ${w}`;return Uc(o,{isRetryable:!1,message:S,statusCode:Zt.INTERNAL_ERROR},C)}function Ys(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 z=y.toLowerCase();if(typeof x==="string")return[[z,x]];if(Array.isArray(x)){let C=x.filter((w)=>typeof w==="string").join("; ");return C.length>0?[[z,C]]:[]}if(typeof x==="number"||typeof x==="boolean")return[[z,String(x)]];return[]});if(h.length===0)return;return Object.fromEntries(h)}function Uc(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 zOe(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 P6(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 COe(o,f){if(zz(o))return o;if(zz(f))return f;if(o instanceof Error){let h=kOe(o.message);if(zz(h))return h}return}function wOe(o,f){if(Wm(o))return o;if(Wm(f))return f;return Zt.INTERNAL_ERROR}function SOe(o){let f=new Set,h=o,y=o,x,z=!1;while(typeof y==="object"&&y!==null&&!f.has(y)){f.add(y),h=y,z||=EOe(y);let C=y;if(x===void 0&&C.isAxiosError===!0)x=C.response;let w="cause"in C?C.cause:y instanceof Error&&A6.isErrorWithCause(y)?y.rootCause:void 0;if(w===void 0||typeof w==="object"&&w!==null&&f.has(w))break;h=w,y=w}return{aborted:z,response:x,rootError:h}}function EOe(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 Wm(o){return typeof o==="number"&&Number.isInteger(o)&&o>=100&&o<600}function Cz(o){return o===Zt.REQUEST_TIMEOUT||o===Zt.CONFLICT||o===Zt.RATE_LIMIT||o>=Zt.INTERNAL_ERROR&&o<600}function zz(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 z=x;if(typeof z.message!=="string")return!1;if("code"in x&&z.code!=null&&typeof z.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 TOe(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 kOe(o){let f=o.indexOf("{");if(f===-1)return null;let h=0,y=-1,x=!1,z=!1;for(let C=f;C<o.length;C++){let w=o.charCodeAt(C);if(x){if(z)z=!1;else if(w===92)z=!0;else if(w===34)x=!1;continue}if(w===34)x=!0;else if(w===123)h++;else if(w===125){if(h--,h===0){y=C;break}}}if(y===-1)return null;try{let C=JSON.parse(o.slice(f,y+1));if(C&&typeof C==="object"&&"error"in C)return C;if(C&&typeof C==="object"&&"message"in C)return{error:C};return null}catch{return null}}var Kr="5.0.3";import{createRequire as OOe}from"module";var M7e=OOe(import.meta.url);function IOe(o,f){if(o==="foundation-models"&&f===!0)throw new Hs(NOe,"foundation-models","orchestration")}function ROe(o){if(!o)return;let f=o;for(let h of N6)if(f[h]!==void 0)throw new Hs(DOe[h],"orchestration","foundation-models")}function AOe(o){if(!o)return;for(let f of j6)if(o[f]!==void 0)throw new Hs(LOe[f],"foundation-models","orchestration")}function POe(o){if(!o)return;let f=o;for(let h of L6)if(f[h]!==void 0)throw new Hs(Sz[h],"foundation-models","orchestration")}var L6=["fallbackModuleConfigs","filtering","grounding","masking","orchestrationConfigRef","placeholderValues","promptTemplateRef","streamOptions","tools","translation"],Sz={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"},N6=["dataSources"],DOe={dataSources:"Azure On Your Data (dataSources)"},BOe=["orchestrationConfigRef","placeholderValues","promptTemplateRef"],j6=["masking"],LOe={masking:Sz.masking},NOe="escapeTemplatePlaceholders (Jinja2 template escaping)";function jOe(o,f,h,y){if(o===f)return;if(!h&&!y)return;if(o==="orchestration"&&f==="foundation-models"){let x=h;for(let z of L6)if(x?.[z]!==void 0)throw new tu(o,f,z);for(let z of j6)if(y?.[z]!==void 0)throw new tu(o,f,z)}if(o==="foundation-models"&&f==="orchestration"){let x=h;for(let z of N6)if(x?.[z]!==void 0)throw new tu(o,f,z)}}var D6=["orchestration","foundation-models"];function zh(o,f,h){return{...ho(o,f),api:f.api??o?.api??h}}function nd(o,f,h){return h??f??o??"orchestration"}function B6(o){if(o===void 0)return;if(typeof o!=="string"||!D6.includes(o))throw Error(`Invalid API type: ${JSON.stringify(o)}. Valid values are: ${D6.map((f)=>`"${f}"`).join(", ")}`)}function iu(o,f){let h=o?.masking;if(!h||typeof h!=="object")return;let y=h,x=y.masking_providers!==void 0,z=y.providers!==void 0;if(x&&!z)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 ad(o){let{api:f,embeddingSettings:h,invocationSettings:y,modelApi:x,modelSettings:z}=o;if(B6(f),y?.api!==void 0)B6(y.api);if(y?.api!==void 0){let E=x??"orchestration";if(E!==y.api)jOe(E,y.api,z,h)}if(f==="foundation-models")POe(z),MOe(y),AOe(h);else ROe(z);let C=z?.escapeTemplatePlaceholders,S=y?.escapeTemplatePlaceholders??C;IOe(f,S)}function MOe(o){if(!o)return;for(let f of BOe)if(o[f]!==void 0)throw new Hs(Sz[f],"foundation-models","orchestration")}import{createRequire as qOe}from"module";var $7e=qOe(import.meta.url),$6="​",M6=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength"),FOe=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype),"length"),UOe=["image/png","image/jpeg","image/jpg","image/gif","image/webp"],q6=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype),Symbol.toStringTag),F6=Object.getOwnPropertyDescriptor(URL.prototype,"href");function md(o){if(typeof o!=="object"||o===null||F6?.get===void 0)return;try{let f=F6.get.call(o);return typeof f==="string"?f:void 0}catch{return}}function U6(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 $Oe(o){if(typeof o!=="object"||o===null||M6?.get===void 0)return!1;try{return M6.get.call(o),!0}catch{return!1}}function VOe(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 z=0;z<y;z++)if(U6(o.charCodeAt(z))<0)return!1;if(h===0)return!0;let x=U6(o.charCodeAt(y-1));return h===1?(x&3)===0:(x&15)===0}function HOe(o){if(typeof o!=="object"||o===null||q6?.get===void 0)return!1;try{return q6.get.call(o)==="Uint8Array"}catch{return!1}}function GOe(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 ni({message:"Tool output cannot be serialized.",prompt:o})}}function KOe(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 ni({message:"Tool call input must be JSON-serializable.",prompt:o})}function Ez(o,f){return f?{cache_control:f,text:o,type:"text"}:{text:o,type:"text"}}var WOe=/\{(?=[{%#])/g,JOe=new RegExp(`\\{${$6}(?=[{%#])`,"g");function hd(o){let h;try{Uint8Array.prototype.at.call(o,0),h=FOe?.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 z=0;z<h;z+=32768){let C=Math.min(32768,h-z);y.length=C;for(let w=0;w<C;w++){let S=o[z+w];if(S===void 0)throw new b({functionality:"Invalid Uint8Array file data."});y[w]=S}x+=String.fromCharCode(...y)}return btoa(x)}function H2(o,f={}){let h=[],y=f.includeReasoning??!1,x=f.escapeTemplatePlaceholders??!0,z=(E)=>x?Q2(E):E,C=f.parsePartProviderOptions,w=C?(E)=>C(E,f.warnings):()=>{return},S=(E,T)=>{if(!f.warnings)return;if(!f.warnings.some((k)=>k.feature===E))f.warnings.push({details:T,feature:E,type:"unsupported"})};for(let E of o)switch(E.role){case"assistant":{let T="",k=C?[]:void 0,O=!1,R=[];for(let I of E.content)switch(I.type){case"file":{S("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>`;T+=A,k?.push({text:A})}break}case"text":{if(!I.text)break;let j=w(I.providerOptions)?.cacheControl;if(T+=I.text,k?.push(j?{cacheControl:j,text:I.text}:{text:I.text}),j)O=!0;break}case"tool-call":{if(w(I.providerOptions)?.cacheControl)S("cacheControl on assistant tool-call","SAP orchestration does not expose cache_control on the assistant tool-call envelope.");let j=KOe(I.input);R.push({function:{arguments:z(j),name:I.toolName},id:I.toolCallId,type:"function"});break}default:{S("unsupported assistant content","Unsupported assistant content type; part ignored.");break}}if(T||R.length>0){let I={content:O&&k?k.map((A)=>Ez(z(A.text),A.cacheControl)):z(T),role:"assistant",tool_calls:R.length>0?R:void 0};h.push(I)}break}case"system":{let k=w(E.providerOptions)?.cacheControl,O=z(E.content),R={content:k?[Ez(O,k)]:O,role:"system"};h.push(R);break}case"tool":{for(let T of E.content)if(T.type==="tool-result"){let O=w(T.providerOptions)?.cacheControl,R=T.output.type==="text"?T.output.value:GOe(T.output),I=z(R),A={content:O?[Ez(I,O)]:I,role:"tool",tool_call_id:T.toolCallId};h.push(A)}else S("non-tool-result content in tool message","Only tool-result parts are forwarded to SAP; other tool content is ignored.");break}case"user":{let T=[];for(let R of E.content){let A=w(R.providerOptions)?.cacheControl;switch(R.type){case"file":{let j=ZOe(R),P=R.mediaType.toLowerCase();if(P.startsWith("image/")){if(!(md(R.data)!==void 0&&P==="image/*")&&!UOe.includes(P))console.warn(`Image format ${R.mediaType} may not be supported by all models. Recommended formats: PNG, JPEG, GIF, WebP`);T.push({...A?{cache_control:A}:{},image_url:{url:j},type:"image_url"})}else T.push({...A?{cache_control:A}:{},file:{file_data:j,...R.filename?{filename:R.filename}:{}},type:"file"});break}case"text":{T.push({...A?{cache_control:A}:{},text:z(R.text),type:"text"});break}default:throw new b({functionality:`Content type ${R.type}`})}}let k=T[0],O=T.length===1&&k?.type==="text"&&k.cache_control===void 0?{content:k.text??"",role:"user"}:{content:T,role:"user"};h.push(O);break}default:throw new ni({message:`Unsupported role: ${E.role}`,prompt:JSON.stringify(E)})}return h}function Q2(o){if(!o)return o;return o.replaceAll(WOe,`{${$6}`)}function YT(o){if(!o)return o;return o.replaceAll(JOe,"{")}function ZOe(o){let{data:f,mediaType:h}=o,y=md(f);if(y!==void 0)return y;if(typeof f==="string")return`data:${h};base64,${f}`;if(HOe(f))return`data:${h};base64,${hd(f)}`;if($Oe(f)){let x;try{x=new Uint8Array(f)}catch{throw new b({functionality:"Detached ArrayBuffer file data is unsupported."})}return`data:${h};base64,${hd(x)}`}if(typeof f==="object"&&f!==null){let x=f.toString;if(typeof x==="function"&&x!==Object.prototype.toString){let z=x.call(f,"base64");if(typeof z==="string"&&VOe(z))return`data:${h};base64,${z}`}}throw new b({functionality:"Unsupported file data type. Expected base64 string, Uint8Array, ArrayBuffer, URL, or a buffer-like object returning canonical base64."})}
213
+ export{se,Bh,mo,V2,id,K2,Fh,jh,$h,qh,ho,tu,Hs,Qs,Ys,Kr,zh,nd,iu,ad,Js,Xs,pa,qo,od,rd,sd,cd,ld,bi,nu,ud,Zs,pd,ec,dd,md,hd,H2,Q2,YT};