gemi 0.28.2 → 0.28.3

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 (89) hide show
  1. package/dist/app/index.js +2 -2
  2. package/dist/app/index.js.map +1 -1
  3. package/dist/auth/AuthenticationServiceProvider.d.ts +1 -1
  4. package/dist/auth/AuthenticationServiceProvider.d.ts.map +1 -1
  5. package/dist/auth/oauth/GoogleOAuthProvider.d.ts +1 -1
  6. package/dist/auth/oauth/GoogleOAuthProvider.d.ts.map +1 -1
  7. package/dist/bin/gemi.js.map +2 -2
  8. package/dist/broadcasting/index.js +1 -1
  9. package/dist/{chunk-9ez69v14.js → chunk-13sdtj3f.js} +2 -2
  10. package/dist/{chunk-9ez69v14.js.map → chunk-13sdtj3f.js.map} +1 -1
  11. package/dist/{chunk-5ts72na6.js → chunk-16hvsdc0.js} +2 -2
  12. package/dist/{chunk-5ts72na6.js.map → chunk-16hvsdc0.js.map} +1 -1
  13. package/dist/chunk-6ws1z2r2.js +5 -0
  14. package/dist/{chunk-5x6b8fr8.js.map → chunk-6ws1z2r2.js.map} +1 -1
  15. package/dist/{chunk-f4nce88x.js → chunk-71v0pn3m.js} +2 -2
  16. package/dist/{chunk-f4nce88x.js.map → chunk-71v0pn3m.js.map} +1 -1
  17. package/dist/{chunk-mvzvmbee.js → chunk-79f3dyfm.js} +3 -3
  18. package/dist/{chunk-mvzvmbee.js.map → chunk-79f3dyfm.js.map} +1 -1
  19. package/dist/{chunk-3fr5vy3a.js → chunk-8saa1z5r.js} +2 -2
  20. package/dist/{chunk-3fr5vy3a.js.map → chunk-8saa1z5r.js.map} +1 -1
  21. package/dist/{chunk-je7fyx2e.js → chunk-9299rve0.js} +2 -2
  22. package/dist/{chunk-je7fyx2e.js.map → chunk-9299rve0.js.map} +1 -1
  23. package/dist/{chunk-76n6xabc.js → chunk-9fw11v51.js} +3 -3
  24. package/dist/{chunk-76n6xabc.js.map → chunk-9fw11v51.js.map} +1 -1
  25. package/dist/{chunk-dr44e4cp.js → chunk-azc29cqe.js} +2 -2
  26. package/dist/{chunk-dr44e4cp.js.map → chunk-azc29cqe.js.map} +1 -1
  27. package/dist/{chunk-cb9mdp8j.js → chunk-c7jptnm4.js} +2 -2
  28. package/dist/{chunk-cb9mdp8j.js.map → chunk-c7jptnm4.js.map} +1 -1
  29. package/dist/{chunk-abx3xx1s.js → chunk-cea86n7w.js} +2 -2
  30. package/dist/{chunk-abx3xx1s.js.map → chunk-cea86n7w.js.map} +1 -1
  31. package/dist/{chunk-bdge6d5c.js → chunk-f5d338pw.js} +1 -1
  32. package/dist/chunk-fbgzzk6r.js +4 -0
  33. package/dist/{chunk-gzvv9n27.js.map → chunk-fbgzzk6r.js.map} +2 -2
  34. package/dist/{chunk-bmrn519y.js → chunk-gaj22pt9.js} +2 -2
  35. package/dist/{chunk-bmrn519y.js.map → chunk-gaj22pt9.js.map} +1 -1
  36. package/dist/{chunk-e5zte0h8.js → chunk-ghy46jx3.js} +2 -2
  37. package/dist/{chunk-e5zte0h8.js.map → chunk-ghy46jx3.js.map} +1 -1
  38. package/dist/{chunk-cqf78dvf.js → chunk-jdywh3jz.js} +2 -2
  39. package/dist/{chunk-cqf78dvf.js.map → chunk-jdywh3jz.js.map} +1 -1
  40. package/dist/{chunk-ca9azf29.js → chunk-jjwkx3n9.js} +2 -2
  41. package/dist/{chunk-ca9azf29.js.map → chunk-jjwkx3n9.js.map} +1 -1
  42. package/dist/{chunk-11zra1sn.js → chunk-n5xvg37g.js} +3 -3
  43. package/dist/{chunk-11zra1sn.js.map → chunk-n5xvg37g.js.map} +1 -1
  44. package/dist/{chunk-vrm2a0sj.js → chunk-p4drhdbp.js} +3 -3
  45. package/dist/{chunk-vrm2a0sj.js.map → chunk-p4drhdbp.js.map} +1 -1
  46. package/dist/{chunk-nggarqwg.js → chunk-ptm665mz.js} +3 -3
  47. package/dist/{chunk-nggarqwg.js.map → chunk-ptm665mz.js.map} +1 -1
  48. package/dist/{chunk-z2gqnxf6.js → chunk-q55gxfvs.js} +3 -3
  49. package/dist/{chunk-z2gqnxf6.js.map → chunk-q55gxfvs.js.map} +1 -1
  50. package/dist/{chunk-v694b1sv.js → chunk-qardppq0.js} +2 -2
  51. package/dist/{chunk-v694b1sv.js.map → chunk-qardppq0.js.map} +1 -1
  52. package/dist/{chunk-mnje5ra8.js → chunk-qfy6gp4k.js} +2 -2
  53. package/dist/{chunk-mnje5ra8.js.map → chunk-qfy6gp4k.js.map} +1 -1
  54. package/dist/chunk-qgce2w0a.js +4 -0
  55. package/dist/{chunk-2ycn27ve.js.map → chunk-qgce2w0a.js.map} +2 -2
  56. package/dist/{chunk-16gcxjex.js → chunk-ss3g2czb.js} +2 -2
  57. package/dist/{chunk-16gcxjex.js.map → chunk-ss3g2czb.js.map} +1 -1
  58. package/dist/{chunk-32phhx0z.js → chunk-xfcxaexm.js} +3 -3
  59. package/dist/{chunk-32phhx0z.js.map → chunk-xfcxaexm.js.map} +1 -1
  60. package/dist/{chunk-vhwfmwaj.js → chunk-xrwqssps.js} +3 -3
  61. package/dist/{chunk-vhwfmwaj.js.map → chunk-xrwqssps.js.map} +1 -1
  62. package/dist/{chunk-jm6je9dt.js → chunk-xtc1ej4p.js} +3 -3
  63. package/dist/{chunk-jm6je9dt.js.map → chunk-xtc1ej4p.js.map} +1 -1
  64. package/dist/{chunk-mp0s4vmc.js → chunk-yc5bcdc2.js} +3 -3
  65. package/dist/{chunk-mp0s4vmc.js.map → chunk-yc5bcdc2.js.map} +1 -1
  66. package/dist/client/Redirect.d.ts +1 -1
  67. package/dist/client/Redirect.d.ts.map +1 -1
  68. package/dist/client/index.js +1 -1
  69. package/dist/client/index.js.map +1 -1
  70. package/dist/email/index.js +2 -2
  71. package/dist/email/index.js.map +1 -1
  72. package/dist/facades/Auth.d.ts +1 -1
  73. package/dist/facades/Auth.d.ts.map +1 -1
  74. package/dist/facades/index.js +17 -17
  75. package/dist/facades/index.js.map +4 -4
  76. package/dist/http/index.js +2 -2
  77. package/dist/http/index.js.map +1 -1
  78. package/dist/i18n/index.js +1 -1
  79. package/dist/kernel/index.js +2 -2
  80. package/dist/kernel/index.js.map +2 -2
  81. package/dist/server/index.js +2 -2
  82. package/dist/server/index.js.map +3 -3
  83. package/dist/services/index.js +6 -6
  84. package/dist/services/index.js.map +3 -3
  85. package/package.json +1 -1
  86. package/dist/chunk-2ycn27ve.js +0 -4
  87. package/dist/chunk-5x6b8fr8.js +0 -5
  88. package/dist/chunk-gzvv9n27.js +0 -4
  89. /package/dist/{chunk-bdge6d5c.js.map → chunk-f5d338pw.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Q as J4,R as M4,S as X4}from"../chunk-e5zte0h8.js";import{$ as t$,T as e$,U as Ih,V as h8,W as e7,X as LR,Y as aJ,Z as iJ,_ as rJ,aa as QY,ba as LY,ca as pJ,da as m4,ea as oJ,fa as rR,ga as xJ,ha as c4,ia as kJ,ja as lJ,ka as sJ,la as _J,ma as dJ}from"../chunk-jm6je9dt.js";import{na as bJ,oa as mJ}from"../chunk-76n6xabc.js";import{qa as NJ}from"../chunk-mp0s4vmc.js";import{Ba as Jf,ra as Vf,sa as C7,ua as n$,va as CJ,xa as cJ,ya as I4,za as g1}from"../chunk-vrm2a0sj.js";import"../chunk-32phhx0z.js";import{Da as t7}from"../chunk-vhwfmwaj.js";import{Ea as H4}from"../chunk-11zra1sn.js";import{Fa as rH}from"../chunk-nggarqwg.js";import{Ja as B$,Ka as r}from"../chunk-9ez69v14.js";import"../chunk-16gcxjex.js";import{Na as m7}from"../chunk-mvzvmbee.js";import{Oa as M,Pa as s,Qa as BR}from"../chunk-mnje5ra8.js";var YU=s((MB,HU)=>{var gM=function(R){return CM(R)&&!mM(R)};function CM(f){return!!f&&typeof f==="object"}function mM(f){var R=Object.prototype.toString.call(f);return R==="[object RegExp]"||R==="[object Date]"||xM(f)}var cM=typeof Symbol==="function"&&Symbol.for,bM=cM?Symbol.for("react.element"):60103;function xM(f){return f.$$typeof===bM}function kM(f){return Array.isArray(f)?[]:{}}function R1(f,R){return R.clone!==!1&&R.isMergeableObject(f)?W0(kM(f),f,R):f}function lM(f,R,h){return f.concat(R).map(function($){return R1($,h)})}function sM(f,R){if(!R.customMerge)return W0;var h=R.customMerge(f);return typeof h==="function"?h:W0}function _M(f){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(f).filter(function(R){return Object.propertyIsEnumerable.call(f,R)}):[]}function NU(f){return Object.keys(f).concat(_M(f))}function UU(f,R){try{return R in f}catch(h){return!1}}function dM(f,R){return UU(f,R)&&!(Object.hasOwnProperty.call(f,R)&&Object.propertyIsEnumerable.call(f,R))}function aM(f,R,h){var $={};if(h.isMergeableObject(f))NU(f).forEach(function(G){$[G]=R1(f[G],h)});return NU(R).forEach(function(G){if(dM(f,G))return;if(UU(f,G)&&h.isMergeableObject(R[G]))$[G]=sM(G,h)(f[G],R[G],h);else $[G]=R1(R[G],h)}),$}function W0(f,R,h){h=h||{},h.arrayMerge=h.arrayMerge||lM,h.isMergeableObject=h.isMergeableObject||gM,h.cloneUnlessOtherwiseSpecified=R1;var $=Array.isArray(R),G=Array.isArray(f),A=$===G;if(!A)return R1(R,h);else if($)return h.arrayMerge(f,R,h);else return aM(f,R,h)}W0.all=function(R,h){if(!Array.isArray(R))throw Error("first argument should be an array");return R.reduce(function($,G){return W0($,G,h)},{})};var iM=W0;HU.exports=iM});var H$=s((xX,jU)=>{function $f(f){this.__parent=f,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}$f.prototype.clone_empty=function(){var f=new $f(this.__parent);return f.set_indent(this.__indent_count,this.__alignment_count),f};$f.prototype.item=function(f){if(f<0)return this.__items[this.__items.length+f];else return this.__items[f]};$f.prototype.has_match=function(f){for(var R=this.__items.length-1;R>=0;R--)if(this.__items[R].match(f))return!0;return!1};$f.prototype.set_indent=function(f,R){if(this.is_empty())this.__indent_count=f||0,this.__alignment_count=R||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count)};$f.prototype._set_wrap_point=function(){if(this.__parent.wrap_line_length)this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count};$f.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count};$f.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var f=this.__parent.current_line;if(f.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),f.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),f.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,f.__items[0]===" ")f.__items.splice(0,1),f.__character_count-=1;return!0}return!1};$f.prototype.is_empty=function(){return this.__items.length===0};$f.prototype.last=function(){if(!this.is_empty())return this.__items[this.__items.length-1];else return null};$f.prototype.push=function(f){this.__items.push(f);var R=f.lastIndexOf(`
2
+ import{R as J4,S as M4,T as X4}from"../chunk-ghy46jx3.js";import{$ as rJ,U as e$,V as Ih,W as h8,X as e7,Y as LR,Z as aJ,_ as iJ,aa as t$,ba as QY,ca as LY,da as pJ,ea as m4,fa as oJ,ga as rR,ha as xJ,ia as c4,ja as kJ,ka as lJ,la as sJ,ma as _J,na as dJ}from"../chunk-xtc1ej4p.js";import{oa as bJ,pa as mJ}from"../chunk-9fw11v51.js";import{ra as NJ}from"../chunk-yc5bcdc2.js";import{Aa as g1,Ca as Jf,sa as Vf,ta as C7,va as n$,wa as CJ,ya as cJ,za as I4}from"../chunk-p4drhdbp.js";import"../chunk-xfcxaexm.js";import{Ea as t7}from"../chunk-xrwqssps.js";import{Fa as H4}from"../chunk-n5xvg37g.js";import{Ga as rH}from"../chunk-ptm665mz.js";import{Ka as B$,La as r}from"../chunk-13sdtj3f.js";import"../chunk-ss3g2czb.js";import{Oa as m7}from"../chunk-79f3dyfm.js";import{Pa as M,Qa as s,Ra as BR}from"../chunk-qfy6gp4k.js";var YU=s((MB,HU)=>{var gM=function(R){return CM(R)&&!mM(R)};function CM(f){return!!f&&typeof f==="object"}function mM(f){var R=Object.prototype.toString.call(f);return R==="[object RegExp]"||R==="[object Date]"||xM(f)}var cM=typeof Symbol==="function"&&Symbol.for,bM=cM?Symbol.for("react.element"):60103;function xM(f){return f.$$typeof===bM}function kM(f){return Array.isArray(f)?[]:{}}function R1(f,R){return R.clone!==!1&&R.isMergeableObject(f)?W0(kM(f),f,R):f}function lM(f,R,h){return f.concat(R).map(function($){return R1($,h)})}function sM(f,R){if(!R.customMerge)return W0;var h=R.customMerge(f);return typeof h==="function"?h:W0}function _M(f){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(f).filter(function(R){return Object.propertyIsEnumerable.call(f,R)}):[]}function NU(f){return Object.keys(f).concat(_M(f))}function UU(f,R){try{return R in f}catch(h){return!1}}function dM(f,R){return UU(f,R)&&!(Object.hasOwnProperty.call(f,R)&&Object.propertyIsEnumerable.call(f,R))}function aM(f,R,h){var $={};if(h.isMergeableObject(f))NU(f).forEach(function(G){$[G]=R1(f[G],h)});return NU(R).forEach(function(G){if(dM(f,G))return;if(UU(f,G)&&h.isMergeableObject(R[G]))$[G]=sM(G,h)(f[G],R[G],h);else $[G]=R1(R[G],h)}),$}function W0(f,R,h){h=h||{},h.arrayMerge=h.arrayMerge||lM,h.isMergeableObject=h.isMergeableObject||gM,h.cloneUnlessOtherwiseSpecified=R1;var $=Array.isArray(R),G=Array.isArray(f),A=$===G;if(!A)return R1(R,h);else if($)return h.arrayMerge(f,R,h);else return aM(f,R,h)}W0.all=function(R,h){if(!Array.isArray(R))throw Error("first argument should be an array");return R.reduce(function($,G){return W0($,G,h)},{})};var iM=W0;HU.exports=iM});var H$=s((xX,jU)=>{function $f(f){this.__parent=f,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}$f.prototype.clone_empty=function(){var f=new $f(this.__parent);return f.set_indent(this.__indent_count,this.__alignment_count),f};$f.prototype.item=function(f){if(f<0)return this.__items[this.__items.length+f];else return this.__items[f]};$f.prototype.has_match=function(f){for(var R=this.__items.length-1;R>=0;R--)if(this.__items[R].match(f))return!0;return!1};$f.prototype.set_indent=function(f,R){if(this.is_empty())this.__indent_count=f||0,this.__alignment_count=R||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count)};$f.prototype._set_wrap_point=function(){if(this.__parent.wrap_line_length)this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count};$f.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count};$f.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var f=this.__parent.current_line;if(f.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),f.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),f.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,f.__items[0]===" ")f.__items.splice(0,1),f.__character_count-=1;return!0}return!1};$f.prototype.is_empty=function(){return this.__items.length===0};$f.prototype.last=function(){if(!this.is_empty())return this.__items[this.__items.length-1];else return null};$f.prototype.push=function(f){this.__items.push(f);var R=f.lastIndexOf(`
3
3
  `);if(R!==-1)this.__character_count=f.length-R;else this.__character_count+=f.length};$f.prototype.pop=function(){var f=null;if(!this.is_empty())f=this.__items.pop(),this.__character_count-=f.length;return f};$f.prototype._remove_indent=function(){if(this.__indent_count>0)this.__indent_count-=1,this.__character_count-=this.__parent.indent_size};$f.prototype._remove_wrap_indent=function(){if(this.__wrap_point_indent_count>0)this.__wrap_point_indent_count-=1};$f.prototype.trim=function(){while(this.last()===" ")this.__items.pop(),this.__character_count-=1};$f.prototype.toString=function(){var f="";if(this.is_empty()){if(this.__parent.indent_empty_lines)f=this.__parent.get_indent_string(this.__indent_count)}else f=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),f+=this.__items.join("");return f};function h1(f,R){if(this.__cache=[""],this.__indent_size=f.indent_size,this.__indent_string=f.indent_char,!f.indent_with_tabs)this.__indent_string=Array(f.indent_size+1).join(f.indent_char);if(R=R||"",f.indent_level>0)R=Array(f.indent_level+1).join(this.__indent_string);this.__base_string=R,this.__base_string_length=R.length}h1.prototype.get_indent_size=function(f,R){var h=this.__base_string_length;if(R=R||0,f<0)h=0;return h+=f*this.__indent_size,h+=R,h};h1.prototype.get_indent_string=function(f,R){var h=this.__base_string;if(R=R||0,f<0)f=0,h="";return R+=f*this.__indent_size,this.__ensure_cache(R),h+=this.__cache[R],h};h1.prototype.__ensure_cache=function(f){while(f>=this.__cache.length)this.__add_column()};h1.prototype.__add_column=function(){var f=this.__cache.length,R=0,h="";if(this.__indent_size&&f>=this.__indent_size)R=Math.floor(f/this.__indent_size),f-=R*this.__indent_size,h=Array(R+1).join(this.__indent_string);if(f)h+=Array(f+1).join(" ");this.__cache.push(h)};function Gf(f,R){this.__indent_cache=new h1(f,R),this.raw=!1,this._end_with_newline=f.end_with_newline,this.indent_size=f.indent_size,this.wrap_line_length=f.wrap_line_length,this.indent_empty_lines=f.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new $f(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}Gf.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)};Gf.prototype.get_line_number=function(){return this.__lines.length};Gf.prototype.get_indent_string=function(f,R){return this.__indent_cache.get_indent_string(f,R)};Gf.prototype.get_indent_size=function(f,R){return this.__indent_cache.get_indent_size(f,R)};Gf.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()};Gf.prototype.add_new_line=function(f){if(this.is_empty()||!f&&this.just_added_newline())return!1;if(!this.raw)this.__add_outputline();return!0};Gf.prototype.get_code=function(f){this.trim(!0);var R=this.current_line.pop();if(R){if(R[R.length-1]===`
4
4
  `)R=R.replace(/\n+$/g,"");this.current_line.push(R)}if(this._end_with_newline)this.__add_outputline();var h=this.__lines.join(`
5
5
  `);if(f!==`
@@ -42,7 +42,7 @@ For more information please go to https://github.com/aws/aws-sdk-js-v3#functiona
42
42
  `+$)});let R=await this.createSessionFn(f);if(!R.Credentials?.AccessKeyId||!R.Credentials?.SecretAccessKey)throw Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:R.Credentials.AccessKeyId,secretAccessKey:R.Credentials.SecretAccessKey,sessionToken:R.Credentials.SessionToken,expiration:R.Credentials.Expiration?new Date(R.Credentials.Expiration):void 0}}}var KW=M(e7(),1);var kR=M(t$(),1),IW="Directory",wW="S3Express",qW="sigv4-s3express",c1="X-Amz-S3session-Token",T0=c1.toLowerCase(),n7="AWS_S3_DISABLE_EXPRESS_SESSION_AUTH",u7="s3_disable_express_session_auth",f8={environmentVariableSelector:(f)=>kR.booleanSelector(f,n7,kR.SelectorType.ENV),configFileSelector:(f)=>kR.booleanSelector(f,u7,kR.SelectorType.CONFIG),default:!1};class b1 extends KW.SignatureV4{async signWithCredentials(f,R,h){let $=PW(R);f.headers[T0]=R.sessionToken;let G=this;return BW(G,$),G.signRequest(f,h??{})}async presignWithCredentials(f,R,h){let $=PW(R);return delete f.headers[T0],f.headers[c1]=R.sessionToken,f.query=f.query??{},f.query[c1]=R.sessionToken,BW(this,$),this.presign(f,h)}}function PW(f){return{accessKeyId:f.accessKeyId,secretAccessKey:f.secretAccessKey,expiration:f.expiration}}function BW(f,R){let h=setTimeout(()=>{throw Error("SignatureV4S3Express credential override was created but not called.")},10),$=f.credentialProvider,G=()=>{return clearTimeout(h),f.credentialProvider=$,Promise.resolve(R)};f.credentialProvider=G}var vW=M(LR(),1),jW=M(Vf(),1);var yW=(f)=>{return(R,h)=>async($)=>{if(h.endpointV2){let G=h.endpointV2,A=G.properties?.authSchemes?.[0]?.name===qW;if(G.properties?.backend===wW||G.properties?.bucketType===IW)vW.setFeature(h,"S3_EXPRESS_BUCKET","J"),h.isS3ExpressBucket=!0;if(A){let F=$.input.Bucket;if(F){let N=await f.s3ExpressIdentityProvider.getS3ExpressIdentity(await f.credentials(),{Bucket:F});if(h.s3ExpressIdentity=N,jW.HttpRequest.isInstance($.request)&&N.sessionToken)$.request.headers[T0]=N.sessionToken}}}return R($)}},OW={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},R8=(f)=>({applyToStack:(R)=>{R.add(yW(f),OW)}});var EW=M(h8(),1),TW=M(Vf(),1),fY=M(t7(),1),gW=M(e$(),1);var VW=async(f,R,h,$)=>{let G=await $.signWithCredentials(h,f,{});if(G.headers["X-Amz-Security-Token"]||G.headers["x-amz-security-token"])throw Error("X-Amz-Security-Token must not be set for s3-express requests.");return G};var RY=(f)=>(R)=>{throw R},hY=(f,R)=>{};var CW=(f)=>(R,h)=>async($)=>{if(!TW.HttpRequest.isInstance($.request))return R($);let A=gW.getSmithyContext(h).selectedHttpAuthScheme;if(!A)throw Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:W={}},identity:F,signer:N}=A,U;if(h.s3ExpressIdentity)U=await VW(h.s3ExpressIdentity,W,$.request,await f.signer());else U=await N.sign($.request,F,W);let J=await R({...$,request:U}).catch((N.errorHandler||RY)(W));return(N.successHandler||hY)(J.response,W),J},$8=(f)=>({applyToStack:(R)=>{R.addRelativeTo(CW(f),EW.httpSigningMiddlewareOptions)}});var mW=(f,{session:R})=>{let[h,$]=R,{forcePathStyle:G,useAccelerateEndpoint:A,disableMultiregionAccessPoints:W,followRegionRedirects:F,s3ExpressIdentityProvider:N,bucketEndpoint:U}=f;return Object.assign(f,{forcePathStyle:G??!1,useAccelerateEndpoint:A??!1,disableMultiregionAccessPoints:W??!1,followRegionRedirects:F??!1,s3ExpressIdentityProvider:N??new E0(async(J)=>h().send(new $({Bucket:J}))),bucketEndpoint:U??!1})};var cW=M(Vf(),1),x1=M(g1(),1),$Y={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},GY=3000,AY=(f)=>(R,h)=>async($)=>{let G=await R($),{response:A}=G;if(!cW.HttpResponse.isInstance(A))return G;let{statusCode:W,body:F}=A;if(W<200||W>=300)return G;if(!(typeof F?.stream==="function"||typeof F?.pipe==="function"||typeof F?.tee==="function"))return G;let U=F,J=F;if(F&&typeof F==="object"&&!(F instanceof Uint8Array))[U,J]=await x1.splitStream(F);A.body=J;let X=await WY(U,{streamCollector:async(S)=>{return x1.headStream(S,GY)}});if(typeof U?.destroy==="function")U.destroy();let z=f.utf8Encoder(X.subarray(X.length-16));if(X.length===0&&$Y[h.commandName]){let S=Error("S3 aborted request");throw S.name="InternalError",S}if(z&&z.endsWith("</Error>"))A.statusCode=400;return G},WY=(f=new Uint8Array,R)=>{if(f instanceof Uint8Array)return Promise.resolve(f);return R.streamCollector(f)||Promise.resolve(new Uint8Array)},FY={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},lR=(f)=>({applyToStack:(R)=>{R.addRelativeTo(AY(f),FY)}});var G8=(f)=>typeof f==="string"&&f.indexOf("arn:")===0&&f.split(":").length>=6;function bW(f){return(R,h)=>async($)=>{if(f.bucketEndpoint){let G=h.endpointV2;if(G){let A=$.input.Bucket;if(typeof A==="string")try{let W=new URL(A);h.endpointV2={...G,url:W}}catch(W){let F=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${A} could not be parsed as URL.`;if(h.logger?.constructor?.name==="NoOpLogger")console.warn(F);else h.logger?.warn?.(F);throw W}}}return R($)}}var xW={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function NY({bucketEndpoint:f}){return(R)=>async(h)=>{let{input:{Bucket:$}}=h;if(!f&&typeof $==="string"&&!G8($)&&$.indexOf("/")>=0){let G=Error(`Bucket name shouldn't contain '/', received '${$}'`);throw G.name="InvalidBucketName",G}return R({...h})}}var UY={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},kW=(f)=>({applyToStack:(R)=>{R.add(NY(f),UY),R.addRelativeTo(bW(f),xW)}});var bh=M(pJ(),1),o4=M(m4(),1),eR=M(h8(),1);var lW=(f)=>Object.assign(f,{eventStreamMarshaller:f.eventStreamSerdeProvider(f)});var n4=M(oJ(),1),u4=M(rR(),1),xh=M(c4(),1),e4=M(Jf(),1);var a1=M(LR(),1);var k1={CrtSignerV4:null};class A8{sigv4aSigner;sigv4Signer;signerOptions;constructor(f){this.sigv4Signer=new b1(f),this.signerOptions=f}async sign(f,R={}){if(R.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().sign(f,R)}return this.sigv4Signer.sign(f,R)}async signWithCredentials(f,R,h={}){if(h.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().signWithCredentials(f,R,h)}return this.sigv4Signer.signWithCredentials(f,R,h)}async presign(f,R={}){if(R.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().presign(f,R)}return this.sigv4Signer.presign(f,R)}async presignWithCredentials(f,R,h={}){if(h.signingRegion==="*")throw Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(f,R,h)}getSigv4aSigner(){if(!this.sigv4aSigner){let f=null;try{if(f=k1.CrtSignerV4,typeof f!=="function")throw Error()}catch(R){throw R.message=`${R.message}
43
43
  Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly.
44
44
  You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";].
45
- For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`,R}this.sigv4aSigner=new f({...this.signerOptions,signingAlgorithm:1})}return this.sigv4aSigner}}var e6=M(rR(),1),pR=M(e$(),1);var u6=M(LY(),1),iR=M(QY(),1);var sR={["required"]:!1,["type"]:"String"},_R={["required"]:!0,default:!1,["type"]:"Boolean"},g0={["required"]:!1,["type"]:"Boolean"},qf={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!0]},k={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},b={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},a={["fn"]:"isSet",["argv"]:[{["ref"]:"Endpoint"}]},_6={["fn"]:"aws.partition",["argv"]:[{["ref"]:"Region"}],["assign"]:"partitionResult"},sW={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]},"aws-cn"]},m0={["fn"]:"isSet",["argv"]:[{["ref"]:"Bucket"}]},y={["ref"]:"Bucket"},_W={["conditions"]:[b],["error"]:"S3Express does not support Dual-stack.",["type"]:"error"},dW={["conditions"]:[qf],["error"]:"S3Express does not support S3 Accelerate.",["type"]:"error"},aW={["conditions"]:[a,{["fn"]:"parseURL",["argv"]:[{["ref"]:"Endpoint"}],["assign"]:"url"}],["rules"]:[{["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"},!0]}],["rules"]:[{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]}],["rules"]:[{["conditions"]:[{["fn"]:"uriEncode",["argv"]:[y],["assign"]:"uri_encoded_bucket"}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[y,!1]}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"},{["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]}],["rules"]:[{["conditions"]:[{["fn"]:"uriEncode",["argv"]:[y],["assign"]:"uri_encoded_bucket"}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[y,!1]}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"},{["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"}],["type"]:"tree"},Mf={["fn"]:"parseURL",["argv"]:[{["ref"]:"Endpoint"}],["assign"]:"url"},W8={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]},d6={["ref"]:"url"},a6={["fn"]:"uriEncode",["argv"]:[y],["assign"]:"uri_encoded_bucket"},IR={["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},I={},i6={["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[y,!1]},iW={["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"},rW={["fn"]:"isSet",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"}]},pW={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"},!0]},w={["fn"]:"not",["argv"]:[a]},l1={["error"]:"Unrecognized S3Express bucket name format.",["type"]:"error"},oW={["fn"]:"not",["argv"]:[m0]},nW={["ref"]:"hardwareType"},uW={["conditions"]:[w],["error"]:"Expected a endpoint to be specified but no endpoint was found",["type"]:"error"},s1={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{Region}"}]},F8={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"ForcePathStyle"},!1]},HY={["ref"]:"ForcePathStyle"},p={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!1]},n={["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"aws-global"]},e={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"us-east-1"}]},j={["fn"]:"not",["argv"]:[n]},t={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},eW={["url"]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},["headers"]:{}},o={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},ff={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!1]},K={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},tW={["url"]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},P={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},f6={["url"]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},R6={["url"]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},N8={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[d6,"isIp"]},!1]},U8={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:o,["headers"]:{}},v8={["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:o,["headers"]:{}},h6={["endpoint"]:v8,["type"]:"endpoint"},H8={["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},$6={["url"]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},_1={["error"]:"Invalid region: region was not a valid DNS name.",["type"]:"error"},Xf={["ref"]:"bucketArn"},r6={["ref"]:"arnType"},Y8={["fn"]:"getAttr",["argv"]:[Xf,"service"]},j8={["ref"]:"accessPointName"},G6={["conditions"]:[b],["error"]:"S3 Object Lambda does not support Dual-stack",["type"]:"error"},A6={["conditions"]:[qf],["error"]:"S3 Object Lambda does not support S3 Accelerate",["type"]:"error"},W6={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableAccessPoints"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableAccessPoints"},!0]}],["error"]:"Access points are not supported for this operation",["type"]:"error"},Z8={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"UseArnRegion"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseArnRegion"},!1]},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"region"]},"{Region}"]}]}],["error"]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",["type"]:"error"},p6={["fn"]:"getAttr",["argv"]:[{["ref"]:"bucketPartition"},"name"]},o6={["fn"]:"getAttr",["argv"]:[Xf,"accountId"]},J8={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{bucketArn#region}"}]},F6={["error"]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",["type"]:"error"},M8={["error"]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",["type"]:"error"},X8={["error"]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",["type"]:"error"},S8={["error"]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",["type"]:"error"},N6={["error"]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",["type"]:"error"},U6={["error"]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",["type"]:"error"},C0={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{bucketArn#region}"}]},H6={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{bucketArn#region}"}]},Y6={["fn"]:"aws.parseArn",["argv"]:[y]},Z6={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:o,["headers"]:{}},J6={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:o,["headers"]:{}},M6={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:o,["headers"]:{}},D8={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:o,["headers"]:{}},X6={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:o,["headers"]:{}},S6={["ref"]:"UseObjectLambdaEndpoint"},z8={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{Region}"}]},D6={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},z6={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},Q6={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},Q8={["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:o,["headers"]:{}},L6={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},L8=[{["ref"]:"Region"}],YY=[{["ref"]:"Endpoint"}],ZY=[y],I6=[b],I8=[qf],dR=[a,Mf],w6=[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"},!0]}],JY=[a6],q6=[i6],wf=[_6],aR=[k],P6=[{["fn"]:"substring",["argv"]:[y,6,14,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,14,16,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],bf=[{["conditions"]:[k],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:IR,["headers"]:{}},["type"]:"endpoint"},{["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:IR,["headers"]:{}},["type"]:"endpoint"}],B6=[{["fn"]:"substring",["argv"]:[y,6,15,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,15,17,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],K6=[{["fn"]:"substring",["argv"]:[y,6,19,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,19,21,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],v6=[{["fn"]:"substring",["argv"]:[y,6,20,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,20,22,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],j6=[{["fn"]:"substring",["argv"]:[y,6,26,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,26,28,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],xf=[{["conditions"]:[k],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"},{["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],y6=[y,0,7,!0],O6=[{["fn"]:"substring",["argv"]:[y,7,15,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,15,17,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],V6=[{["fn"]:"substring",["argv"]:[y,7,16,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,16,18,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],E6=[{["fn"]:"substring",["argv"]:[y,7,20,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,20,22,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],T6=[{["fn"]:"substring",["argv"]:[y,7,21,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,21,23,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],g6=[{["fn"]:"substring",["argv"]:[y,7,27,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,27,29,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],MY=[m0],C6=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"outpostId"},!1]}],m6=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"regionPrefix"},"beta"]}],XY=["*"],c6=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!1]}],uf=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"us-east-1"]}],w8=[{["fn"]:"stringEquals",["argv"]:[r6,"accesspoint"]}],b6=[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[1]"],["assign"]:"accessPointName"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[j8,""]}]}],SY=[Xf,"resourceId[1]"],q8=[{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"region"]},""]}]}],x6=[{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[2]"]}]}]}],DY=[Xf,"resourceId[2]"],P8=[{["fn"]:"aws.partition",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"region"]}],["assign"]:"bucketPartition"}],k6=[{["fn"]:"stringEquals",["argv"]:[p6,{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]}]}],B8=[{["fn"]:"isValidHostLabel",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"region"]},!0]}],K8=[{["fn"]:"isValidHostLabel",["argv"]:[o6,!1]}],l6=[{["fn"]:"isValidHostLabel",["argv"]:[j8,!1]}],s6=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!0]}],zY={version:"1.0",parameters:{Bucket:sR,Region:sR,UseFIPS:_R,UseDualStack:_R,Endpoint:sR,ForcePathStyle:_R,Accelerate:_R,UseGlobalEndpoint:_R,UseObjectLambdaEndpoint:g0,Key:sR,Prefix:sR,CopySource:sR,DisableAccessPoints:g0,DisableMultiRegionAccessPoints:_R,UseArnRegion:g0,UseS3ExpressControlEndpoint:g0,DisableS3ExpressSessionAuth:g0},["rules"]:[{["conditions"]:[{["fn"]:"isSet",["argv"]:L8}],["rules"]:[{["conditions"]:[qf,k],error:"Accelerate cannot be used with FIPS",["type"]:"error"},{["conditions"]:[b,a],error:"Cannot set dual-stack in combination with a custom endpoint.",["type"]:"error"},{["conditions"]:[a,k],error:"A custom endpoint cannot be combined with FIPS",["type"]:"error"},{["conditions"]:[a,qf],error:"A custom endpoint cannot be combined with S3 Accelerate",["type"]:"error"},{["conditions"]:[k,_6,sW],error:"Partition does not support FIPS",["type"]:"error"},{["conditions"]:[m0,{["fn"]:"substring",["argv"]:[y,0,6,!0],["assign"]:"bucketSuffix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketSuffix"},"--x-s3"]}],["rules"]:[_W,dW,aW,{["conditions"]:[rW,pW],["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:[a6,w],["rules"]:[{["conditions"]:aR,endpoint:{["url"]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:IR,["headers"]:I},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:IR,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:q6,["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:w6,["rules"]:[{["conditions"]:P6,["rules"]:bf,["type"]:"tree"},{["conditions"]:B6,["rules"]:bf,["type"]:"tree"},{["conditions"]:K6,["rules"]:bf,["type"]:"tree"},{["conditions"]:v6,["rules"]:bf,["type"]:"tree"},{["conditions"]:j6,["rules"]:bf,["type"]:"tree"},l1],["type"]:"tree"},{["conditions"]:P6,["rules"]:xf,["type"]:"tree"},{["conditions"]:B6,["rules"]:xf,["type"]:"tree"},{["conditions"]:K6,["rules"]:xf,["type"]:"tree"},{["conditions"]:v6,["rules"]:xf,["type"]:"tree"},{["conditions"]:j6,["rules"]:xf,["type"]:"tree"},l1],["type"]:"tree"}],["type"]:"tree"},iW],["type"]:"tree"},{["conditions"]:[m0,{["fn"]:"substring",["argv"]:y6,["assign"]:"accessPointSuffix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"accessPointSuffix"},"--xa-s3"]}],["rules"]:[_W,dW,aW,{["conditions"]:q6,["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:w6,["rules"]:[{["conditions"]:O6,["rules"]:bf,["type"]:"tree"},{["conditions"]:V6,["rules"]:bf,["type"]:"tree"},{["conditions"]:E6,["rules"]:bf,["type"]:"tree"},{["conditions"]:T6,["rules"]:bf,["type"]:"tree"},{["conditions"]:g6,["rules"]:bf,["type"]:"tree"},l1],["type"]:"tree"},{["conditions"]:O6,["rules"]:xf,["type"]:"tree"},{["conditions"]:V6,["rules"]:xf,["type"]:"tree"},{["conditions"]:E6,["rules"]:xf,["type"]:"tree"},{["conditions"]:T6,["rules"]:xf,["type"]:"tree"},{["conditions"]:g6,["rules"]:xf,["type"]:"tree"},l1],["type"]:"tree"}],["type"]:"tree"},iW],["type"]:"tree"},{["conditions"]:[oW,rW,pW],["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:dR,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:IR,["headers"]:I},["type"]:"endpoint"},{["conditions"]:aR,endpoint:{["url"]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:IR,["headers"]:I},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",["properties"]:IR,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[m0,{["fn"]:"substring",["argv"]:[y,49,50,!0],["assign"]:"hardwareType"},{["fn"]:"substring",["argv"]:[y,8,12,!0],["assign"]:"regionPrefix"},{["fn"]:"substring",["argv"]:y6,["assign"]:"bucketAliasSuffix"},{["fn"]:"substring",["argv"]:[y,32,49,!0],["assign"]:"outpostId"},{["fn"]:"aws.partition",["argv"]:L8,["assign"]:"regionPartition"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketAliasSuffix"},"--op-s3"]}],["rules"]:[{["conditions"]:C6,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[nW,"e"]}],["rules"]:[{["conditions"]:m6,["rules"]:[uW,{["conditions"]:dR,endpoint:{["url"]:"https://{Bucket}.ec2.{url#authority}",["properties"]:s1,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:s1,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[nW,"o"]}],["rules"]:[{["conditions"]:m6,["rules"]:[uW,{["conditions"]:dR,endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.{url#authority}",["properties"]:s1,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:s1,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",["type"]:"error"}],["type"]:"tree"},{["conditions"]:MY,["rules"]:[{["conditions"]:[a,{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"parseURL",["argv"]:YY}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",["type"]:"error"},{["conditions"]:[F8,i6],["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:c6,["rules"]:[{["conditions"]:[qf,sW],error:"S3 Accelerate cannot be used in this region",["type"]:"error"},{["conditions"]:[b,k,p,w,n],endpoint:{["url"]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[b,k,p,w,j,t],["rules"]:[{endpoint:eW,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[b,k,p,w,j,ff],endpoint:eW,["type"]:"endpoint"},{["conditions"]:[K,k,p,w,n],endpoint:{["url"]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[K,k,p,w,j,t],["rules"]:[{endpoint:tW,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[K,k,p,w,j,ff],endpoint:tW,["type"]:"endpoint"},{["conditions"]:[b,P,qf,w,n],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[b,P,qf,w,j,t],["rules"]:[{endpoint:f6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[b,P,qf,w,j,ff],endpoint:f6,["type"]:"endpoint"},{["conditions"]:[b,P,p,w,n],endpoint:{["url"]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[b,P,p,w,j,t],["rules"]:[{endpoint:R6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[b,P,p,w,j,ff],endpoint:R6,["type"]:"endpoint"},{["conditions"]:[K,P,p,a,Mf,W8,n],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[K,P,p,a,Mf,N8,n],endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[K,P,p,a,Mf,W8,j,t],["rules"]:[{["conditions"]:uf,endpoint:U8,["type"]:"endpoint"},{endpoint:U8,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[K,P,p,a,Mf,N8,j,t],["rules"]:[{["conditions"]:uf,endpoint:v8,["type"]:"endpoint"},h6],["type"]:"tree"},{["conditions"]:[K,P,p,a,Mf,W8,j,ff],endpoint:U8,["type"]:"endpoint"},{["conditions"]:[K,P,p,a,Mf,N8,j,ff],endpoint:v8,["type"]:"endpoint"},{["conditions"]:[K,P,qf,w,n],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[K,P,qf,w,j,t],["rules"]:[{["conditions"]:uf,endpoint:H8,["type"]:"endpoint"},{endpoint:H8,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[K,P,qf,w,j,ff],endpoint:H8,["type"]:"endpoint"},{["conditions"]:[K,P,p,w,n],endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[K,P,p,w,j,t],["rules"]:[{["conditions"]:uf,endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:I},["type"]:"endpoint"},{endpoint:$6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[K,P,p,w,j,ff],endpoint:$6,["type"]:"endpoint"}],["type"]:"tree"},_1],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[a,Mf,{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[d6,"scheme"]},"http"]},{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[y,!0]},F8,P,K,p],["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:c6,["rules"]:[h6],["type"]:"tree"},_1],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[F8,{["fn"]:"aws.parseArn",["argv"]:ZY,["assign"]:"bucketArn"}],["rules"]:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[0]"],["assign"]:"arnType"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[r6,""]}]}],["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Y8,"s3-object-lambda"]}],["rules"]:[{["conditions"]:w8,["rules"]:[{["conditions"]:b6,["rules"]:[G6,A6,{["conditions"]:q8,["rules"]:[W6,{["conditions"]:x6,["rules"]:[Z8,{["conditions"]:P8,["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:k6,["rules"]:[{["conditions"]:B8,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[o6,""]}],error:"Invalid ARN: Missing account id",["type"]:"error"},{["conditions"]:K8,["rules"]:[{["conditions"]:l6,["rules"]:[{["conditions"]:dR,endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:J8,["headers"]:I},["type"]:"endpoint"},{["conditions"]:aR,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:J8,["headers"]:I},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:J8,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},F6],["type"]:"tree"},M8],["type"]:"tree"},X8],["type"]:"tree"},S8],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},N6],["type"]:"tree"},{error:"Invalid ARN: bucket ARN is missing a region",["type"]:"error"}],["type"]:"tree"},U6],["type"]:"tree"},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",["type"]:"error"}],["type"]:"tree"},{["conditions"]:w8,["rules"]:[{["conditions"]:b6,["rules"]:[{["conditions"]:q8,["rules"]:[{["conditions"]:w8,["rules"]:[{["conditions"]:q8,["rules"]:[W6,{["conditions"]:x6,["rules"]:[Z8,{["conditions"]:P8,["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[p6,"{partitionResult#name}"]}],["rules"]:[{["conditions"]:B8,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Y8,"s3"]}],["rules"]:[{["conditions"]:K8,["rules"]:[{["conditions"]:l6,["rules"]:[{["conditions"]:I8,error:"Access Points do not support S3 Accelerate",["type"]:"error"},{["conditions"]:[k,b],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:C0,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[k,K],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:C0,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[P,b],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:C0,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[P,K,a,Mf],endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:C0,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[P,K],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:C0,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},F6],["type"]:"tree"},M8],["type"]:"tree"},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",["type"]:"error"}],["type"]:"tree"},X8],["type"]:"tree"},S8],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},N6],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"isValidHostLabel",["argv"]:[j8,!0]}],["rules"]:[{["conditions"]:I6,error:"S3 MRAP does not support dual-stack",["type"]:"error"},{["conditions"]:aR,error:"S3 MRAP does not support FIPS",["type"]:"error"},{["conditions"]:I8,error:"S3 MRAP does not support S3 Accelerate",["type"]:"error"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableMultiRegionAccessPoints"},!0]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",["type"]:"error"},{["conditions"]:[{["fn"]:"aws.partition",["argv"]:L8,["assign"]:"mrapPartition"}],["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"mrapPartition"},"name"]},{["fn"]:"getAttr",["argv"]:[Xf,"partition"]}]}],["rules"]:[{endpoint:{["url"]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",["properties"]:{["authSchemes"]:[{["disableDoubleEncoding"]:!0,name:"sigv4a",["signingName"]:"s3",["signingRegionSet"]:XY}]},["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",["type"]:"error"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Access Point Name",["type"]:"error"}],["type"]:"tree"},U6],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Y8,"s3-outposts"]}],["rules"]:[{["conditions"]:I6,error:"S3 Outposts does not support Dual-stack",["type"]:"error"},{["conditions"]:aR,error:"S3 Outposts does not support FIPS",["type"]:"error"},{["conditions"]:I8,error:"S3 Outposts does not support S3 Accelerate",["type"]:"error"},{["conditions"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",["type"]:"error"},{["conditions"]:[{["fn"]:"getAttr",["argv"]:SY,["assign"]:"outpostId"}],["rules"]:[{["conditions"]:C6,["rules"]:[Z8,{["conditions"]:P8,["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:k6,["rules"]:[{["conditions"]:B8,["rules"]:[{["conditions"]:K8,["rules"]:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:DY,["assign"]:"outpostType"}],["rules"]:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[3]"],["assign"]:"accessPointName"}],["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"outpostType"},"accesspoint"]}],["rules"]:[{["conditions"]:dR,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",["properties"]:H6,["headers"]:I},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:H6,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},{error:"Expected an outpost type `accesspoint`, found {outpostType}",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: expected an access point name",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: Expected a 4-component resource",["type"]:"error"}],["type"]:"tree"},M8],["type"]:"tree"},X8],["type"]:"tree"},S8],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: The Outpost Id was not set",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: No ARN type specified",["type"]:"error"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"substring",["argv"]:[y,0,4,!1],["assign"]:"arnPrefix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"arnPrefix"},"arn:"]},{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[Y6]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",["type"]:"error"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[HY,!0]},Y6],error:"Path-style addressing cannot be used with ARN buckets",["type"]:"error"},{["conditions"]:JY,["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:[p],["rules"]:[{["conditions"]:[b,w,k,n],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[b,w,k,j,t],["rules"]:[{endpoint:Z6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[b,w,k,j,ff],endpoint:Z6,["type"]:"endpoint"},{["conditions"]:[K,w,k,n],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[K,w,k,j,t],["rules"]:[{endpoint:J6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[K,w,k,j,ff],endpoint:J6,["type"]:"endpoint"},{["conditions"]:[b,w,P,n],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[b,w,P,j,t],["rules"]:[{endpoint:M6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[b,w,P,j,ff],endpoint:M6,["type"]:"endpoint"},{["conditions"]:[K,a,Mf,P,n],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[K,a,Mf,P,j,t],["rules"]:[{["conditions"]:uf,endpoint:D8,["type"]:"endpoint"},{endpoint:D8,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[K,a,Mf,P,j,ff],endpoint:D8,["type"]:"endpoint"},{["conditions"]:[K,w,P,n],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[K,w,P,j,t],["rules"]:[{["conditions"]:uf,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:o,["headers"]:I},["type"]:"endpoint"},{endpoint:X6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[K,w,P,j,ff],endpoint:X6,["type"]:"endpoint"}],["type"]:"tree"},{error:"Path-style addressing cannot be used with S3 Accelerate",["type"]:"error"}],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"isSet",["argv"]:[S6]},{["fn"]:"booleanEquals",["argv"]:[S6,!0]}],["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:s6,["rules"]:[G6,A6,{["conditions"]:dR,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:z8,["headers"]:I},["type"]:"endpoint"},{["conditions"]:aR,endpoint:{["url"]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:z8,["headers"]:I},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",["properties"]:z8,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},_1],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[oW],["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:s6,["rules"]:[{["conditions"]:[k,b,w,n],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[k,b,w,j,t],["rules"]:[{endpoint:D6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[k,b,w,j,ff],endpoint:D6,["type"]:"endpoint"},{["conditions"]:[k,K,w,n],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[k,K,w,j,t],["rules"]:[{endpoint:z6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[k,K,w,j,ff],endpoint:z6,["type"]:"endpoint"},{["conditions"]:[P,b,w,n],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[P,b,w,j,t],["rules"]:[{endpoint:Q6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[P,b,w,j,ff],endpoint:Q6,["type"]:"endpoint"},{["conditions"]:[P,K,a,Mf,n],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[P,K,a,Mf,j,t],["rules"]:[{["conditions"]:uf,endpoint:Q8,["type"]:"endpoint"},{endpoint:Q8,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[P,K,a,Mf,j,ff],endpoint:Q8,["type"]:"endpoint"},{["conditions"]:[P,K,w,n],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[P,K,w,j,t],["rules"]:[{["conditions"]:uf,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:I},["type"]:"endpoint"},{endpoint:L6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[P,K,w,j,ff],endpoint:L6,["type"]:"endpoint"}],["type"]:"tree"},_1],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{error:"A region must be set when sending requests to S3.",["type"]:"error"}]},n6=zY;var IY=new iR.EndpointCache({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),d1=(f,R={})=>{return IY.get(f,()=>iR.resolveEndpoint(n6,{endpointParams:f,logger:R.logger}))};iR.customEndpointFunctions.aws=u6.awsEndpointFunctions;var wY=(f)=>async(R,h,$)=>{if(!$)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let G=await f(R,h,$),A=pR.getSmithyContext(h)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!A)throw Error(`getEndpointParameterInstructions() is not defined on \`${h.commandName}\``);let W=await e6.resolveParams($,{getEndpointParameterInstructions:A},R);return Object.assign(G,W)},qY=async(f,R,h)=>{return{operation:pR.getSmithyContext(R).operation,region:await pR.normalizeProvider(f.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},t6=wY(qY);function fF(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:f.region},propertiesExtractor:(R,h)=>({signingProperties:{config:R,context:h}})}}function RF(f){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:f.region},propertiesExtractor:(R,h)=>({signingProperties:{config:R,context:h}})}}var PY=(f,R,h)=>{return(G)=>{let W=f(G).properties?.authSchemes;if(!W)return R(G);let F=[];for(let N of W){let{name:U,properties:J={},...X}=N,z=U.toLowerCase();if(U!==z)console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${U}\` to \`${z}\``);let S;if(z==="sigv4a"){S="aws.auth#sigv4a";let i=W.find((yf)=>{let Of=yf.name.toLowerCase();return Of!=="sigv4a"&&Of.startsWith("sigv4")});if(!k1.CrtSignerV4&&i)continue}else if(z.startsWith("sigv4"))S="aws.auth#sigv4";else throw Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${z}\``);let B=h[S];if(!B)throw Error(`Could not find HttpAuthOption create function for \`${S}\``);let C=B(G);C.schemeId=S,C.signingProperties={...C.signingProperties||{},...X,...J},F.push(C)}return F}},BY=(f)=>{let R=[];switch(f.operation){default:R.push(fF(f)),R.push(RF(f))}return R},hF=PY(d1,BY,{"aws.auth#sigv4":fF,"aws.auth#sigv4a":RF}),$F=(f)=>{let R=a1.resolveAwsSdkSigV4Config(f),h=a1.resolveAwsSdkSigV4AConfig(R);return Object.assign(h,{authSchemePreference:pR.normalizeProvider(f.authSchemePreference??[])})};var A4=M(rR(),1),W4=M(Ih(),1),F4=M(Jf(),1);var GF=(f)=>{return Object.assign(f,{useFipsEndpoint:f.useFipsEndpoint??!1,useDualstackEndpoint:f.useDualstackEndpoint??!1,forcePathStyle:f.forcePathStyle??!1,useAccelerateEndpoint:f.useAccelerateEndpoint??!1,useGlobalEndpoint:f.useGlobalEndpoint??!1,disableMultiregionAccessPoints:f.disableMultiregionAccessPoints??!1,defaultSigningName:"s3"})},ef={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var df=M(Jf(),1);var AF=M(Jf(),1);class u extends AF.ServiceException{constructor(f){super(f);Object.setPrototypeOf(this,u.prototype)}}class i1 extends u{name="NoSuchUpload";$fault="client";constructor(f){super({name:"NoSuchUpload",$fault:"client",...f});Object.setPrototypeOf(this,i1.prototype)}}class r1 extends u{name="ObjectNotInActiveTierError";$fault="client";constructor(f){super({name:"ObjectNotInActiveTierError",$fault:"client",...f});Object.setPrototypeOf(this,r1.prototype)}}class p1 extends u{name="BucketAlreadyExists";$fault="client";constructor(f){super({name:"BucketAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,p1.prototype)}}class o1 extends u{name="BucketAlreadyOwnedByYou";$fault="client";constructor(f){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...f});Object.setPrototypeOf(this,o1.prototype)}}class n1 extends u{name="NoSuchBucket";$fault="client";constructor(f){super({name:"NoSuchBucket",$fault:"client",...f});Object.setPrototypeOf(this,n1.prototype)}}var y8;(function(f){f.visit=(R,h)=>{if(R.Prefix!==void 0)return h.Prefix(R.Prefix);if(R.Tag!==void 0)return h.Tag(R.Tag);if(R.And!==void 0)return h.And(R.And);return h._(R.$unknown[0],R.$unknown[1])}})(y8||(y8={}));var O8;(function(f){f.visit=(R,h)=>{if(R.Prefix!==void 0)return h.Prefix(R.Prefix);if(R.Tag!==void 0)return h.Tag(R.Tag);if(R.AccessPointArn!==void 0)return h.AccessPointArn(R.AccessPointArn);if(R.And!==void 0)return h.And(R.And);return h._(R.$unknown[0],R.$unknown[1])}})(O8||(O8={}));class u1 extends u{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(f){super({name:"InvalidObjectState",$fault:"client",...f});Object.setPrototypeOf(this,u1.prototype),this.StorageClass=f.StorageClass,this.AccessTier=f.AccessTier}}class e1 extends u{name="NoSuchKey";$fault="client";constructor(f){super({name:"NoSuchKey",$fault:"client",...f});Object.setPrototypeOf(this,e1.prototype)}}class t1 extends u{name="NotFound";$fault="client";constructor(f){super({name:"NotFound",$fault:"client",...f});Object.setPrototypeOf(this,t1.prototype)}}var KY=(f)=>({...f,...f.SecretAccessKey&&{SecretAccessKey:df.SENSITIVE_STRING},...f.SessionToken&&{SessionToken:df.SENSITIVE_STRING}}),WF=(f)=>({...f,...f.SSEKMSKeyId&&{SSEKMSKeyId:df.SENSITIVE_STRING},...f.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:df.SENSITIVE_STRING},...f.Credentials&&{Credentials:KY(f.Credentials)}}),FF=(f)=>({...f,...f.SSEKMSKeyId&&{SSEKMSKeyId:df.SENSITIVE_STRING},...f.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:df.SENSITIVE_STRING}});var NF=(f)=>({...f,...f.SSEKMSKeyId&&{SSEKMSKeyId:df.SENSITIVE_STRING}}),UF=(f)=>({...f,...f.SSECustomerKey&&{SSECustomerKey:df.SENSITIVE_STRING}});var PR=M(LR(),1);var l0=M(h8(),1),jY=M(Vf(),1),H=M(Jf(),1);var oR=M(Jf(),1);class fh extends u{name="EncryptionTypeMismatch";$fault="client";constructor(f){super({name:"EncryptionTypeMismatch",$fault:"client",...f});Object.setPrototypeOf(this,fh.prototype)}}class Rh extends u{name="InvalidRequest";$fault="client";constructor(f){super({name:"InvalidRequest",$fault:"client",...f});Object.setPrototypeOf(this,Rh.prototype)}}class hh extends u{name="InvalidWriteOffset";$fault="client";constructor(f){super({name:"InvalidWriteOffset",$fault:"client",...f});Object.setPrototypeOf(this,hh.prototype)}}class $h extends u{name="TooManyParts";$fault="client";constructor(f){super({name:"TooManyParts",$fault:"client",...f});Object.setPrototypeOf(this,$h.prototype)}}class Gh extends u{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(f){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...f});Object.setPrototypeOf(this,Gh.prototype)}}var HF;(function(f){f.visit=(R,h)=>{if(R.Records!==void 0)return h.Records(R.Records);if(R.Stats!==void 0)return h.Stats(R.Stats);if(R.Progress!==void 0)return h.Progress(R.Progress);if(R.Cont!==void 0)return h.Cont(R.Cont);if(R.End!==void 0)return h.End(R.End);return h._(R.$unknown[0],R.$unknown[1])}})(HF||(HF={}));var YF=(f)=>({...f,...f.SSEKMSKeyId&&{SSEKMSKeyId:oR.SENSITIVE_STRING},...f.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:oR.SENSITIVE_STRING}}),ZF=(f)=>({...f,...f.SSECustomerKey&&{SSECustomerKey:oR.SENSITIVE_STRING},...f.SSEKMSKeyId&&{SSEKMSKeyId:oR.SENSITIVE_STRING},...f.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:oR.SENSITIVE_STRING}});var qF=async(f,R)=>{let h=l0.requestBuilder(f,R),$=H.map({},H.isSerializableHeaderValue,{[nZ]:f[IZ],[d0]:f[s0],[a0]:f[_0],[zh]:f[Dh],[fR]:[()=>H.isSerializableHeaderValue(f[qR]),()=>f[qR].toString()]});h.bp("/"),h.p("Bucket",()=>f.Bucket,"{Bucket}",!1);let G=H.map({[aZ]:[,""]}),A;return h.m("GET").h($).q(G).b(A),h.build()};var PF=async(f,R)=>{let h=l0.requestBuilder(f,R),$=H.map({},H.isSerializableHeaderValue,{[pF]:f[mF],[EZ]:[()=>H.isSerializableHeaderValue(f[JF]),()=>H.dateToUtcString(f[JF]).toString()],[oF]:f[cF],[TZ]:[()=>H.isSerializableHeaderValue(f[MF]),()=>H.dateToUtcString(f[MF]).toString()],[bZ]:f[ZZ],[Qh]:f[Xh],[R4]:f[kF],[Lh]:f[Sh],[X3]:f[W3],[J3]:f[G3],[oZ]:f[tY]});h.bp("/{Key+}"),h.p("Bucket",()=>f.Bucket,"{Bucket}",!1),h.p("Key",()=>f.Key,"{Key+}",!0);let G=H.map({[G4]:[,"GetObject"],[xZ]:[,f[JZ]],[kZ]:[,f[MZ]],[lZ]:[,f[XZ]],[sZ]:[,f[SZ]],[_Z]:[,f[DZ]],[dZ]:[()=>f.ResponseExpires!==void 0,()=>H.dateToUtcString(f[zZ]).toString()],[rZ]:[,f[F3]],[mZ]:[()=>f.PartNumber!==void 0,()=>f[YZ].toString()]}),A;return h.m("GET").h($).q(G).b(A),h.build()};var BF=async(f,R)=>{let h=l0.requestBuilder(f,R),$=H.map({},H.isSerializableHeaderValue,{[X3]:f[W3],[J3]:f[G3],[RJ]:[()=>H.isSerializableHeaderValue(f[XF]),()=>(f[XF]||[]).map(H.quoteHeader).join(", ")]});h.bp("/"),h.p("Bucket",()=>f.Bucket,"{Bucket}",!1);let G=H.map({[gZ]:[,"2"],[jZ]:[,f[Nh]],[yZ]:[,f[Uh]],[CZ]:[()=>f.MaxKeys!==void 0,()=>f[Yh].toString()],[cZ]:[,f[wR]],[vZ]:[,f[Fh]],[VZ]:[()=>f.FetchOwner!==void 0,()=>f[GZ].toString()],[iZ]:[,f[Zh]]}),A;return h.m("GET").h($).q(G).b(A),h.build()};var KF=async(f,R)=>{let h=l0.requestBuilder(f,R),$=H.map({},H.isSerializableHeaderValue,{[iF]:f[CF]||"application/octet-stream",[pZ]:f[uY],[sF]:f[VF],[_F]:f[EF],[dF]:f[TF],[aF]:f[gF],[n8]:[()=>H.isSerializableHeaderValue(f[r8]),()=>f[r8].toString()],[BZ]:f[fZ],[GJ]:f[c0],[N3]:f[t8],[U3]:f[f3],[H3]:f[R3],[Y3]:f[h3],[Z3]:f[$3],[u8]:[()=>H.isSerializableHeaderValue(f[p8]),()=>H.dateToUtcString(f[p8]).toString()],[pF]:f[mF],[oF]:f[cF],[uZ]:f[AZ],[eZ]:f[WZ],[tZ]:f[FZ],[fJ]:f[NZ],[WJ]:[()=>H.isSerializableHeaderValue(f[SF]),()=>f[SF].toString()],[d0]:f[s0],[f4]:f[tf],[$4]:f[lF],[Qh]:f[Xh],[R4]:f[kF],[Lh]:f[Sh],[a0]:f[_0],[zh]:f[Dh],[fR]:[()=>H.isSerializableHeaderValue(f[qR]),()=>f[qR].toString()],[X3]:f[W3],[AJ]:f[wZ],[tF]:f[xF],[e8]:[()=>H.isSerializableHeaderValue(f[o8]),()=>H.serializeDateTime(f[o8]).toString()],[eF]:f[bF],[J3]:f[G3],...f.Metadata!==void 0&&Object.keys(f.Metadata).reduce((F,N)=>{return F[`x-amz-meta-${N.toLowerCase()}`]=f.Metadata[N],F},{})});h.bp("/{Key+}"),h.p("Bucket",()=>f.Bucket,"{Bucket}",!1),h.p("Key",()=>f.Key,"{Key+}",!0);let G=H.map({[G4]:[,"PutObject"]}),A,W;if(f.Body!==void 0)W=f.Body,A=W;return h.m("PUT").h($).q(G).b(A),h.build()};var vF=async(f,R)=>{if(f.statusCode!==200&&f.statusCode>=300)return Mh(f,R);let h=H.map({$metadata:Nf(f),[s0]:[,f.headers[d0]],[_0]:[,f.headers[a0]],[Dh]:[,f.headers[zh]],[qR]:[()=>f.headers[fR]!==void 0,()=>H.parseBoolean(f.headers[fR])]}),$=H.expectNonNull(H.expectObject(await PR.parseXmlBody(f.body,R)),"body");if($[T8]!=null)h[T8]=nY($[T8],R);return h};var jF=async(f,R)=>{if(f.statusCode!==200&&f.statusCode>=300)return Mh(f,R);let h=H.map({$metadata:Nf(f),[hZ]:[()=>f.headers[zF]!==void 0,()=>H.parseBoolean(f.headers[zF])],[eY]:[,f.headers[PZ]],[k0]:[,f.headers[uF]],[LZ]:[,f.headers[hJ]],[Hh]:[()=>f.headers[DF]!==void 0,()=>H.expectNonNull(H.parseRfc7231DateTime(f.headers[DF]))],[r8]:[()=>f.headers[n8]!==void 0,()=>H.strictParseLong(f.headers[n8])],[x0]:[,f.headers[rF]],[t8]:[,f.headers[N3]],[f3]:[,f.headers[U3]],[R3]:[,f.headers[H3]],[h3]:[,f.headers[Y3]],[$3]:[,f.headers[Z3]],[b0]:[,f.headers[nF]],[UZ]:[()=>f.headers[QF]!==void 0,()=>H.strictParseInt32(f.headers[QF])],[F3]:[,f.headers[h4]],[VF]:[,f.headers[sF]],[EF]:[,f.headers[_F]],[TF]:[,f.headers[dF]],[gF]:[,f.headers[aF]],[RZ]:[,f.headers[KZ]],[CF]:[,f.headers[iF]],[p8]:[()=>f.headers[u8]!==void 0,()=>H.expectNonNull(H.parseRfc7231DateTime(f.headers[u8]))],[$Z]:[,f.headers[OZ]],[lF]:[,f.headers[$4]],[s0]:[,f.headers[d0]],[Xh]:[,f.headers[Qh]],[Sh]:[,f.headers[Lh]],[_0]:[,f.headers[a0]],[qR]:[()=>f.headers[fR]!==void 0,()=>H.parseBoolean(f.headers[fR])],[tf]:[,f.headers[f4]],[A3]:[,f.headers[M3]],[QZ]:[,f.headers[$J]],[HZ]:[()=>f.headers[LF]!==void 0,()=>H.strictParseInt32(f.headers[LF])],[qZ]:[()=>f.headers[wF]!==void 0,()=>H.strictParseInt32(f.headers[wF])],[xF]:[,f.headers[tF]],[o8]:[()=>f.headers[e8]!==void 0,()=>H.expectNonNull(H.parseRfc3339DateTimeWithOffset(f.headers[e8]))],[bF]:[,f.headers[eF]],Metadata:[,Object.keys(f.headers).filter((G)=>G.startsWith("x-amz-meta-")).reduce((G,A)=>{return G[A.substring(11)]=f.headers[A],G},{})]}),$=f.body;return R.sdkStreamMixin($),h.Body=$,h};var yF=async(f,R)=>{if(f.statusCode!==200&&f.statusCode>=300)return Mh(f,R);let h=H.map({$metadata:Nf(f),[A3]:[,f.headers[M3]]}),$=H.expectNonNull(H.expectObject(await PR.parseXmlBody(f.body,R)),"body");if($.CommonPrefixes==="")h[Ah]=[];else if($[Ah]!=null)h[Ah]=aY(H.getArrayIfSingleItem($[Ah]),R);if($.Contents==="")h[Wh]=[];else if($[Wh]!=null)h[Wh]=rY(H.getArrayIfSingleItem($[Wh]),R);if($[Fh]!=null)h[Fh]=H.expectString($[Fh]);if($[Nh]!=null)h[Nh]=H.expectString($[Nh]);if($[Uh]!=null)h[Uh]=H.expectString($[Uh]);if($[c8]!=null)h[c8]=H.parseBoolean($[c8]);if($[x8]!=null)h[x8]=H.strictParseInt32($[x8]);if($[Yh]!=null)h[Yh]=H.strictParseInt32($[Yh]);if($[k8]!=null)h[k8]=H.expectString($[k8]);if($[l8]!=null)h[l8]=H.expectString($[l8]);if($[wR]!=null)h[wR]=H.expectString($[wR]);if($[Zh]!=null)h[Zh]=H.expectString($[Zh]);return h};var OF=async(f,R)=>{if(f.statusCode!==200&&f.statusCode>=300)return Mh(f,R);let h=H.map({$metadata:Nf(f),[k0]:[,f.headers[uF]],[x0]:[,f.headers[rF]],[t8]:[,f.headers[N3]],[f3]:[,f.headers[U3]],[R3]:[,f.headers[H3]],[h3]:[,f.headers[Y3]],[$3]:[,f.headers[Z3]],[b0]:[,f.headers[nF]],[s0]:[,f.headers[d0]],[F3]:[,f.headers[h4]],[Xh]:[,f.headers[Qh]],[Sh]:[,f.headers[Lh]],[_0]:[,f.headers[a0]],[Dh]:[,f.headers[zh]],[qR]:[()=>f.headers[fR]!==void 0,()=>H.parseBoolean(f.headers[fR])],[Jh]:[()=>f.headers[IF]!==void 0,()=>H.strictParseLong(f.headers[IF])],[A3]:[,f.headers[M3]]});return await H.collectBody(f.body,R),h};var Mh=async(f,R)=>{let h={...f,body:await PR.parseXmlErrorBody(f.body,R)},$=PR.loadRestXmlErrorCode(f,h.body);switch($){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":throw await bY(h,R);case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":throw await lY(h,R);case"BucketAlreadyExists":case"com.amazonaws.s3#BucketAlreadyExists":throw await OY(h,R);case"BucketAlreadyOwnedByYou":case"com.amazonaws.s3#BucketAlreadyOwnedByYou":throw await VY(h,R);case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await mY(h,R);case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":throw await TY(h,R);case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await cY(h,R);case"NotFound":case"com.amazonaws.s3#NotFound":throw await xY(h,R);case"EncryptionTypeMismatch":case"com.amazonaws.s3#EncryptionTypeMismatch":throw await EY(h,R);case"InvalidRequest":case"com.amazonaws.s3#InvalidRequest":throw await gY(h,R);case"InvalidWriteOffset":case"com.amazonaws.s3#InvalidWriteOffset":throw await CY(h,R);case"TooManyParts":case"com.amazonaws.s3#TooManyParts":throw await sY(h,R);case"ObjectAlreadyInActiveTierError":case"com.amazonaws.s3#ObjectAlreadyInActiveTierError":throw await kY(h,R);default:let G=h.body;return yY({output:f,parsedBody:G,errorCode:$})}},yY=H.withBaseException(u),OY=async(f,R)=>{let h=H.map({}),$=f.body,G=new p1({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},VY=async(f,R)=>{let h=H.map({}),$=f.body,G=new o1({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},EY=async(f,R)=>{let h=H.map({}),$=f.body,G=new fh({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},TY=async(f,R)=>{let h=H.map({}),$=f.body;if($[E8]!=null)h[E8]=H.expectString($[E8]);if($[tf]!=null)h[tf]=H.expectString($[tf]);let G=new u1({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},gY=async(f,R)=>{let h=H.map({}),$=f.body,G=new Rh({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},CY=async(f,R)=>{let h=H.map({}),$=f.body,G=new hh({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},mY=async(f,R)=>{let h=H.map({}),$=f.body,G=new n1({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},cY=async(f,R)=>{let h=H.map({}),$=f.body,G=new e1({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},bY=async(f,R)=>{let h=H.map({}),$=f.body,G=new i1({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},xY=async(f,R)=>{let h=H.map({}),$=f.body,G=new t1({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},kY=async(f,R)=>{let h=H.map({}),$=f.body,G=new Gh({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},lY=async(f,R)=>{let h=H.map({}),$=f.body,G=new r1({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},sY=async(f,R)=>{let h=H.map({}),$=f.body,G=new $h({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)};var _Y=(f,R)=>{return(f||[]).filter((h)=>h!=null).map((h)=>{return H.expectString(h)})},dY=(f,R)=>{let h={};if(f[wR]!=null)h[wR]=H.expectString(f[wR]);return h},aY=(f,R)=>{return(f||[]).filter((h)=>h!=null).map((h)=>{return dY(h,R)})};var iY=(f,R)=>{let h={};if(f[b8]!=null)h[b8]=H.expectString(f[b8]);if(f[Hh]!=null)h[Hh]=H.expectNonNull(H.parseRfc3339DateTimeWithOffset(f[Hh]));if(f[x0]!=null)h[x0]=H.expectString(f[x0]);if(f.ChecksumAlgorithm==="")h[c0]=[];else if(f[c0]!=null)h[c0]=_Y(H.getArrayIfSingleItem(f[c0]),R);if(f[b0]!=null)h[b0]=H.expectString(f[b0]);if(f[Jh]!=null)h[Jh]=H.strictParseLong(f[Jh]);if(f[tf]!=null)h[tf]=H.expectString(f[tf]);if(f[s8]!=null)h[s8]=pY(f[s8],R);if(f[d8]!=null)h[d8]=oY(f[d8],R);return h},rY=(f,R)=>{return(f||[]).filter((h)=>h!=null).map((h)=>{return iY(h,R)})};var pY=(f,R)=>{let h={};if(f[g8]!=null)h[g8]=H.expectString(f[g8]);if(f[C8]!=null)h[C8]=H.expectString(f[C8]);return h};var oY=(f,R)=>{let h={};if(f[m8]!=null)h[m8]=H.parseBoolean(f[m8]);if(f[_8]!=null)h[_8]=H.expectNonNull(H.parseRfc3339DateTimeWithOffset(f[_8]));return h};var nY=(f,R)=>{let h={};if(f[V8]!=null)h[V8]=H.expectString(f[V8]);if(f[a8]!=null)h[a8]=H.expectString(f[a8]);if(f[i8]!=null)h[i8]=H.expectString(f[i8]);if(f[k0]!=null)h[k0]=H.expectNonNull(H.parseRfc3339DateTimeWithOffset(f[k0]));return h};var Nf=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var uY="ACL";var V8="AccessKeyId";var eY="AcceptRanges";var E8="AccessTier";var qR="BucketKeyEnabled";var T8="Credentials",c0="ChecksumAlgorithm";var VF="CacheControl",t8="ChecksumCRC32",f3="ChecksumCRC32C",R3="ChecksumCRC64NVME",EF="ContentDisposition";var TF="ContentEncoding";var gF="ContentLanguage",r8="ContentLength",tY="ChecksumMode",fZ="ContentMD5";var Ah="CommonPrefixes";var RZ="ContentRange";var h3="ChecksumSHA1",$3="ChecksumSHA256";var b0="ChecksumType",CF="ContentType";var Fh="ContinuationToken";var Wh="Contents";var Nh="Delimiter";var hZ="DeleteMarker";var g8="DisplayName";var p8="Expires";var G3="ExpectedBucketOwner";var $Z="ExpiresString";var Uh="EncodingType",x0="ETag";var k0="Expiration";var GZ="FetchOwner";var AZ="GrantFullControl";var WZ="GrantRead",FZ="GrantReadACP";var NZ="GrantWriteACP";var C8="ID";var mF="IfMatch";var JF="IfModifiedSince",cF="IfNoneMatch";var m8="IsRestoreInProgress";var c8="IsTruncated";var MF="IfUnmodifiedSince";var b8="Key",x8="KeyCount";var Hh="LastModified";var Yh="MaxKeys";var UZ="MissingMeta";var k8="Name";var l8="NextContinuationToken";var s8="Owner";var bF="ObjectLockLegalHoldStatus",xF="ObjectLockMode";var o8="ObjectLockRetainUntilDate";var XF="OptionalObjectAttributes";var wR="Prefix";var HZ="PartsCount";var YZ="PartNumber";var ZZ="Range";var A3="RequestCharged",JZ="ResponseCacheControl",MZ="ResponseContentDisposition",XZ="ResponseContentEncoding",SZ="ResponseContentLanguage",DZ="ResponseContentType";var zZ="ResponseExpires",_8="RestoreExpiryDate";var W3="RequestPayer";var QZ="ReplicationStatus",d8="RestoreStatus";var LZ="Restore";var Zh="StartAfter",a8="SecretAccessKey";var tf="StorageClass";var IZ="SessionMode";var s0="ServerSideEncryption";var Xh="SSECustomerAlgorithm",kF="SSECustomerKey",Sh="SSECustomerKeyMD5";var Dh="SSEKMSEncryptionContext",_0="SSEKMSKeyId";var i8="SessionToken";var Jh="Size";var wZ="Tagging";var qZ="TagCount";var F3="VersionId";var SF="WriteOffsetBytes",lF="WebsiteRedirectLocation";var PZ="accept-ranges";var sF="cache-control",_F="content-disposition",dF="content-encoding",aF="content-language",n8="content-length",BZ="content-md5",KZ="content-range",iF="content-type",vZ="continuation-token";var jZ="delimiter",u8="expires";var yZ="encoding-type",rF="etag",OZ="expiresstring",VZ="fetch-owner";var pF="if-match",EZ="if-modified-since";var oF="if-none-match";var TZ="if-unmodified-since";var DF="last-modified";var gZ="list-type";var CZ="max-keys";var mZ="partNumber";var cZ="prefix";var bZ="range",xZ="response-cache-control",kZ="response-content-disposition",lZ="response-content-encoding",sZ="response-content-language",_Z="response-content-type",dZ="response-expires";var aZ="session",iZ="start-after";var rZ="versionId";var pZ="x-amz-acl";var N3="x-amz-checksum-crc32",U3="x-amz-checksum-crc32c",H3="x-amz-checksum-crc64nvme",oZ="x-amz-checksum-mode";var Y3="x-amz-checksum-sha1",Z3="x-amz-checksum-sha256";var nZ="x-amz-create-session-mode";var nF="x-amz-checksum-type",zF="x-amz-delete-marker",uF="x-amz-expiration",J3="x-amz-expected-bucket-owner";var uZ="x-amz-grant-full-control",eZ="x-amz-grant-read",tZ="x-amz-grant-read-acp";var fJ="x-amz-grant-write-acp";var QF="x-amz-missing-meta";var LF="x-amz-mp-parts-count";var eF="x-amz-object-lock-legal-hold",tF="x-amz-object-lock-mode",e8="x-amz-object-lock-retain-until-date";var RJ="x-amz-optional-object-attributes",IF="x-amz-object-size";var hJ="x-amz-restore",M3="x-amz-request-charged";var X3="x-amz-request-payer";var $J="x-amz-replication-status";var f4="x-amz-storage-class",GJ="x-amz-sdk-checksum-algorithm";var d0="x-amz-server-side-encryption",a0="x-amz-server-side-encryption-aws-kms-key-id",fR="x-amz-server-side-encryption-bucket-key-enabled",zh="x-amz-server-side-encryption-context",Qh="x-amz-server-side-encryption-customer-algorithm",R4="x-amz-server-side-encryption-customer-key",Lh="x-amz-server-side-encryption-customer-key-md5",AJ="x-amz-tagging",wF="x-amz-tagging-count";var h4="x-amz-version-id",WJ="x-amz-write-offset-bytes",$4="x-amz-website-redirect-location",G4="x-id";class S3 extends F4.Command.classBuilder().ep({...ef,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(f,R,h,$){return[W4.getSerdePlugin(h,this.serialize,this.deserialize),A4.getEndpointPlugin(h,f.getEndpointParameterInstructions()),lR(h)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").f(FF,WF).ser(qF).de(vF).build(){}var N4={name:"@aws-sdk/client-s3",description:"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",version:"3.797.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-s3","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo s3",test:"yarn g:vitest run","test:browser":"node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.ts","test:browser:watch":"node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.ts","test:e2e":"yarn g:vitest run -c vitest.config.e2e.ts && yarn test:browser","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.ts","test:watch":"yarn g:vitest watch"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha1-browser":"5.2.0","@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.796.0","@aws-sdk/credential-provider-node":"3.797.0","@aws-sdk/middleware-bucket-endpoint":"3.775.0","@aws-sdk/middleware-expect-continue":"3.775.0","@aws-sdk/middleware-flexible-checksums":"3.796.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-location-constraint":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-sdk-s3":"3.796.0","@aws-sdk/middleware-ssec":"3.775.0","@aws-sdk/middleware-user-agent":"3.796.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/signature-v4-multi-region":"3.796.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.787.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.796.0","@aws-sdk/xml-builder":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/eventstream-serde-browser":"^4.0.2","@smithy/eventstream-serde-config-resolver":"^4.1.0","@smithy/eventstream-serde-node":"^4.0.2","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-blob-browser":"^4.0.2","@smithy/hash-node":"^4.0.2","@smithy/hash-stream-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/md5-js":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-stream":"^4.2.0","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.3",tslib:"^2.6.2"},devDependencies:{"@aws-sdk/signature-v4-crt":"3.796.0","@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-s3"}};var Oh=M(LR(),1);var RR=M(H4(),1),S4=M(NJ(),1);var wh=M(H4(),1),U4="AWS_EC2_METADATA_DISABLED",Y4=async(f)=>{let{ENV_CMDS_FULL_URI:R,ENV_CMDS_RELATIVE_URI:h,fromContainerMetadata:$,fromInstanceMetadata:G}=await import("../chunk-76n6xabc.js");if(process.env[h]||process.env[R]){f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:A}=await import("../chunk-v694b1sv.js");return wh.chain(A(f),$(f))}if(process.env[U4]&&process.env[U4]!=="false")return async()=>{throw new wh.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:f.logger})};return f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),G(f)};var Z4=!1,D4=(f={})=>RR.memoize(RR.chain(async()=>{if(f.profile??process.env[S4.ENV_PROFILE]){if(process.env[J4]&&process.env[M4]){if(!Z4)(f.logger?.warn&&f.logger?.constructor?.name!=="NoOpLogger"?f.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
45
+ For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`,R}this.sigv4aSigner=new f({...this.signerOptions,signingAlgorithm:1})}return this.sigv4aSigner}}var e6=M(rR(),1),pR=M(e$(),1);var u6=M(LY(),1),iR=M(QY(),1);var sR={["required"]:!1,["type"]:"String"},_R={["required"]:!0,default:!1,["type"]:"Boolean"},g0={["required"]:!1,["type"]:"Boolean"},qf={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!0]},k={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},b={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},a={["fn"]:"isSet",["argv"]:[{["ref"]:"Endpoint"}]},_6={["fn"]:"aws.partition",["argv"]:[{["ref"]:"Region"}],["assign"]:"partitionResult"},sW={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]},"aws-cn"]},m0={["fn"]:"isSet",["argv"]:[{["ref"]:"Bucket"}]},y={["ref"]:"Bucket"},_W={["conditions"]:[b],["error"]:"S3Express does not support Dual-stack.",["type"]:"error"},dW={["conditions"]:[qf],["error"]:"S3Express does not support S3 Accelerate.",["type"]:"error"},aW={["conditions"]:[a,{["fn"]:"parseURL",["argv"]:[{["ref"]:"Endpoint"}],["assign"]:"url"}],["rules"]:[{["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"},!0]}],["rules"]:[{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]}],["rules"]:[{["conditions"]:[{["fn"]:"uriEncode",["argv"]:[y],["assign"]:"uri_encoded_bucket"}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[y,!1]}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"},{["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]}],["rules"]:[{["conditions"]:[{["fn"]:"uriEncode",["argv"]:[y],["assign"]:"uri_encoded_bucket"}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[y,!1]}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"},{["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"}],["type"]:"tree"},Mf={["fn"]:"parseURL",["argv"]:[{["ref"]:"Endpoint"}],["assign"]:"url"},W8={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]},d6={["ref"]:"url"},a6={["fn"]:"uriEncode",["argv"]:[y],["assign"]:"uri_encoded_bucket"},IR={["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},I={},i6={["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[y,!1]},iW={["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"},rW={["fn"]:"isSet",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"}]},pW={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"},!0]},w={["fn"]:"not",["argv"]:[a]},l1={["error"]:"Unrecognized S3Express bucket name format.",["type"]:"error"},oW={["fn"]:"not",["argv"]:[m0]},nW={["ref"]:"hardwareType"},uW={["conditions"]:[w],["error"]:"Expected a endpoint to be specified but no endpoint was found",["type"]:"error"},s1={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{Region}"}]},F8={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"ForcePathStyle"},!1]},HY={["ref"]:"ForcePathStyle"},p={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!1]},n={["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"aws-global"]},e={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"us-east-1"}]},j={["fn"]:"not",["argv"]:[n]},t={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},eW={["url"]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},["headers"]:{}},o={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},ff={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!1]},K={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},tW={["url"]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},P={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},f6={["url"]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},R6={["url"]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},N8={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[d6,"isIp"]},!1]},U8={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:o,["headers"]:{}},v8={["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:o,["headers"]:{}},h6={["endpoint"]:v8,["type"]:"endpoint"},H8={["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},$6={["url"]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},_1={["error"]:"Invalid region: region was not a valid DNS name.",["type"]:"error"},Xf={["ref"]:"bucketArn"},r6={["ref"]:"arnType"},Y8={["fn"]:"getAttr",["argv"]:[Xf,"service"]},j8={["ref"]:"accessPointName"},G6={["conditions"]:[b],["error"]:"S3 Object Lambda does not support Dual-stack",["type"]:"error"},A6={["conditions"]:[qf],["error"]:"S3 Object Lambda does not support S3 Accelerate",["type"]:"error"},W6={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableAccessPoints"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableAccessPoints"},!0]}],["error"]:"Access points are not supported for this operation",["type"]:"error"},Z8={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"UseArnRegion"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseArnRegion"},!1]},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"region"]},"{Region}"]}]}],["error"]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",["type"]:"error"},p6={["fn"]:"getAttr",["argv"]:[{["ref"]:"bucketPartition"},"name"]},o6={["fn"]:"getAttr",["argv"]:[Xf,"accountId"]},J8={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{bucketArn#region}"}]},F6={["error"]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",["type"]:"error"},M8={["error"]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",["type"]:"error"},X8={["error"]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",["type"]:"error"},S8={["error"]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",["type"]:"error"},N6={["error"]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",["type"]:"error"},U6={["error"]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",["type"]:"error"},C0={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{bucketArn#region}"}]},H6={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{bucketArn#region}"}]},Y6={["fn"]:"aws.parseArn",["argv"]:[y]},Z6={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:o,["headers"]:{}},J6={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:o,["headers"]:{}},M6={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:o,["headers"]:{}},D8={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:o,["headers"]:{}},X6={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:o,["headers"]:{}},S6={["ref"]:"UseObjectLambdaEndpoint"},z8={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{Region}"}]},D6={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},z6={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},Q6={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},Q8={["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:o,["headers"]:{}},L6={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:{}},L8=[{["ref"]:"Region"}],YY=[{["ref"]:"Endpoint"}],ZY=[y],I6=[b],I8=[qf],dR=[a,Mf],w6=[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"},!0]}],JY=[a6],q6=[i6],wf=[_6],aR=[k],P6=[{["fn"]:"substring",["argv"]:[y,6,14,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,14,16,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],bf=[{["conditions"]:[k],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:IR,["headers"]:{}},["type"]:"endpoint"},{["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:IR,["headers"]:{}},["type"]:"endpoint"}],B6=[{["fn"]:"substring",["argv"]:[y,6,15,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,15,17,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],K6=[{["fn"]:"substring",["argv"]:[y,6,19,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,19,21,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],v6=[{["fn"]:"substring",["argv"]:[y,6,20,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,20,22,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],j6=[{["fn"]:"substring",["argv"]:[y,6,26,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,26,28,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],xf=[{["conditions"]:[k],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"},{["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],y6=[y,0,7,!0],O6=[{["fn"]:"substring",["argv"]:[y,7,15,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,15,17,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],V6=[{["fn"]:"substring",["argv"]:[y,7,16,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,16,18,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],E6=[{["fn"]:"substring",["argv"]:[y,7,20,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,20,22,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],T6=[{["fn"]:"substring",["argv"]:[y,7,21,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,21,23,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],g6=[{["fn"]:"substring",["argv"]:[y,7,27,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[y,27,29,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],MY=[m0],C6=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"outpostId"},!1]}],m6=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"regionPrefix"},"beta"]}],XY=["*"],c6=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!1]}],uf=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"us-east-1"]}],w8=[{["fn"]:"stringEquals",["argv"]:[r6,"accesspoint"]}],b6=[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[1]"],["assign"]:"accessPointName"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[j8,""]}]}],SY=[Xf,"resourceId[1]"],q8=[{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"region"]},""]}]}],x6=[{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[2]"]}]}]}],DY=[Xf,"resourceId[2]"],P8=[{["fn"]:"aws.partition",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"region"]}],["assign"]:"bucketPartition"}],k6=[{["fn"]:"stringEquals",["argv"]:[p6,{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]}]}],B8=[{["fn"]:"isValidHostLabel",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"region"]},!0]}],K8=[{["fn"]:"isValidHostLabel",["argv"]:[o6,!1]}],l6=[{["fn"]:"isValidHostLabel",["argv"]:[j8,!1]}],s6=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!0]}],zY={version:"1.0",parameters:{Bucket:sR,Region:sR,UseFIPS:_R,UseDualStack:_R,Endpoint:sR,ForcePathStyle:_R,Accelerate:_R,UseGlobalEndpoint:_R,UseObjectLambdaEndpoint:g0,Key:sR,Prefix:sR,CopySource:sR,DisableAccessPoints:g0,DisableMultiRegionAccessPoints:_R,UseArnRegion:g0,UseS3ExpressControlEndpoint:g0,DisableS3ExpressSessionAuth:g0},["rules"]:[{["conditions"]:[{["fn"]:"isSet",["argv"]:L8}],["rules"]:[{["conditions"]:[qf,k],error:"Accelerate cannot be used with FIPS",["type"]:"error"},{["conditions"]:[b,a],error:"Cannot set dual-stack in combination with a custom endpoint.",["type"]:"error"},{["conditions"]:[a,k],error:"A custom endpoint cannot be combined with FIPS",["type"]:"error"},{["conditions"]:[a,qf],error:"A custom endpoint cannot be combined with S3 Accelerate",["type"]:"error"},{["conditions"]:[k,_6,sW],error:"Partition does not support FIPS",["type"]:"error"},{["conditions"]:[m0,{["fn"]:"substring",["argv"]:[y,0,6,!0],["assign"]:"bucketSuffix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketSuffix"},"--x-s3"]}],["rules"]:[_W,dW,aW,{["conditions"]:[rW,pW],["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:[a6,w],["rules"]:[{["conditions"]:aR,endpoint:{["url"]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:IR,["headers"]:I},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:IR,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:q6,["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:w6,["rules"]:[{["conditions"]:P6,["rules"]:bf,["type"]:"tree"},{["conditions"]:B6,["rules"]:bf,["type"]:"tree"},{["conditions"]:K6,["rules"]:bf,["type"]:"tree"},{["conditions"]:v6,["rules"]:bf,["type"]:"tree"},{["conditions"]:j6,["rules"]:bf,["type"]:"tree"},l1],["type"]:"tree"},{["conditions"]:P6,["rules"]:xf,["type"]:"tree"},{["conditions"]:B6,["rules"]:xf,["type"]:"tree"},{["conditions"]:K6,["rules"]:xf,["type"]:"tree"},{["conditions"]:v6,["rules"]:xf,["type"]:"tree"},{["conditions"]:j6,["rules"]:xf,["type"]:"tree"},l1],["type"]:"tree"}],["type"]:"tree"},iW],["type"]:"tree"},{["conditions"]:[m0,{["fn"]:"substring",["argv"]:y6,["assign"]:"accessPointSuffix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"accessPointSuffix"},"--xa-s3"]}],["rules"]:[_W,dW,aW,{["conditions"]:q6,["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:w6,["rules"]:[{["conditions"]:O6,["rules"]:bf,["type"]:"tree"},{["conditions"]:V6,["rules"]:bf,["type"]:"tree"},{["conditions"]:E6,["rules"]:bf,["type"]:"tree"},{["conditions"]:T6,["rules"]:bf,["type"]:"tree"},{["conditions"]:g6,["rules"]:bf,["type"]:"tree"},l1],["type"]:"tree"},{["conditions"]:O6,["rules"]:xf,["type"]:"tree"},{["conditions"]:V6,["rules"]:xf,["type"]:"tree"},{["conditions"]:E6,["rules"]:xf,["type"]:"tree"},{["conditions"]:T6,["rules"]:xf,["type"]:"tree"},{["conditions"]:g6,["rules"]:xf,["type"]:"tree"},l1],["type"]:"tree"}],["type"]:"tree"},iW],["type"]:"tree"},{["conditions"]:[oW,rW,pW],["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:dR,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:IR,["headers"]:I},["type"]:"endpoint"},{["conditions"]:aR,endpoint:{["url"]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:IR,["headers"]:I},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",["properties"]:IR,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[m0,{["fn"]:"substring",["argv"]:[y,49,50,!0],["assign"]:"hardwareType"},{["fn"]:"substring",["argv"]:[y,8,12,!0],["assign"]:"regionPrefix"},{["fn"]:"substring",["argv"]:y6,["assign"]:"bucketAliasSuffix"},{["fn"]:"substring",["argv"]:[y,32,49,!0],["assign"]:"outpostId"},{["fn"]:"aws.partition",["argv"]:L8,["assign"]:"regionPartition"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketAliasSuffix"},"--op-s3"]}],["rules"]:[{["conditions"]:C6,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[nW,"e"]}],["rules"]:[{["conditions"]:m6,["rules"]:[uW,{["conditions"]:dR,endpoint:{["url"]:"https://{Bucket}.ec2.{url#authority}",["properties"]:s1,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:s1,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[nW,"o"]}],["rules"]:[{["conditions"]:m6,["rules"]:[uW,{["conditions"]:dR,endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.{url#authority}",["properties"]:s1,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:s1,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",["type"]:"error"}],["type"]:"tree"},{["conditions"]:MY,["rules"]:[{["conditions"]:[a,{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"parseURL",["argv"]:YY}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",["type"]:"error"},{["conditions"]:[F8,i6],["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:c6,["rules"]:[{["conditions"]:[qf,sW],error:"S3 Accelerate cannot be used in this region",["type"]:"error"},{["conditions"]:[b,k,p,w,n],endpoint:{["url"]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[b,k,p,w,j,t],["rules"]:[{endpoint:eW,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[b,k,p,w,j,ff],endpoint:eW,["type"]:"endpoint"},{["conditions"]:[K,k,p,w,n],endpoint:{["url"]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[K,k,p,w,j,t],["rules"]:[{endpoint:tW,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[K,k,p,w,j,ff],endpoint:tW,["type"]:"endpoint"},{["conditions"]:[b,P,qf,w,n],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[b,P,qf,w,j,t],["rules"]:[{endpoint:f6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[b,P,qf,w,j,ff],endpoint:f6,["type"]:"endpoint"},{["conditions"]:[b,P,p,w,n],endpoint:{["url"]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[b,P,p,w,j,t],["rules"]:[{endpoint:R6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[b,P,p,w,j,ff],endpoint:R6,["type"]:"endpoint"},{["conditions"]:[K,P,p,a,Mf,W8,n],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[K,P,p,a,Mf,N8,n],endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[K,P,p,a,Mf,W8,j,t],["rules"]:[{["conditions"]:uf,endpoint:U8,["type"]:"endpoint"},{endpoint:U8,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[K,P,p,a,Mf,N8,j,t],["rules"]:[{["conditions"]:uf,endpoint:v8,["type"]:"endpoint"},h6],["type"]:"tree"},{["conditions"]:[K,P,p,a,Mf,W8,j,ff],endpoint:U8,["type"]:"endpoint"},{["conditions"]:[K,P,p,a,Mf,N8,j,ff],endpoint:v8,["type"]:"endpoint"},{["conditions"]:[K,P,qf,w,n],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[K,P,qf,w,j,t],["rules"]:[{["conditions"]:uf,endpoint:H8,["type"]:"endpoint"},{endpoint:H8,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[K,P,qf,w,j,ff],endpoint:H8,["type"]:"endpoint"},{["conditions"]:[K,P,p,w,n],endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[K,P,p,w,j,t],["rules"]:[{["conditions"]:uf,endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:I},["type"]:"endpoint"},{endpoint:$6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[K,P,p,w,j,ff],endpoint:$6,["type"]:"endpoint"}],["type"]:"tree"},_1],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[a,Mf,{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[d6,"scheme"]},"http"]},{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[y,!0]},F8,P,K,p],["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:c6,["rules"]:[h6],["type"]:"tree"},_1],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[F8,{["fn"]:"aws.parseArn",["argv"]:ZY,["assign"]:"bucketArn"}],["rules"]:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[0]"],["assign"]:"arnType"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[r6,""]}]}],["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Y8,"s3-object-lambda"]}],["rules"]:[{["conditions"]:w8,["rules"]:[{["conditions"]:b6,["rules"]:[G6,A6,{["conditions"]:q8,["rules"]:[W6,{["conditions"]:x6,["rules"]:[Z8,{["conditions"]:P8,["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:k6,["rules"]:[{["conditions"]:B8,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[o6,""]}],error:"Invalid ARN: Missing account id",["type"]:"error"},{["conditions"]:K8,["rules"]:[{["conditions"]:l6,["rules"]:[{["conditions"]:dR,endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:J8,["headers"]:I},["type"]:"endpoint"},{["conditions"]:aR,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:J8,["headers"]:I},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:J8,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},F6],["type"]:"tree"},M8],["type"]:"tree"},X8],["type"]:"tree"},S8],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},N6],["type"]:"tree"},{error:"Invalid ARN: bucket ARN is missing a region",["type"]:"error"}],["type"]:"tree"},U6],["type"]:"tree"},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",["type"]:"error"}],["type"]:"tree"},{["conditions"]:w8,["rules"]:[{["conditions"]:b6,["rules"]:[{["conditions"]:q8,["rules"]:[{["conditions"]:w8,["rules"]:[{["conditions"]:q8,["rules"]:[W6,{["conditions"]:x6,["rules"]:[Z8,{["conditions"]:P8,["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[p6,"{partitionResult#name}"]}],["rules"]:[{["conditions"]:B8,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Y8,"s3"]}],["rules"]:[{["conditions"]:K8,["rules"]:[{["conditions"]:l6,["rules"]:[{["conditions"]:I8,error:"Access Points do not support S3 Accelerate",["type"]:"error"},{["conditions"]:[k,b],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:C0,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[k,K],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:C0,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[P,b],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:C0,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[P,K,a,Mf],endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:C0,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[P,K],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:C0,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},F6],["type"]:"tree"},M8],["type"]:"tree"},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",["type"]:"error"}],["type"]:"tree"},X8],["type"]:"tree"},S8],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},N6],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"isValidHostLabel",["argv"]:[j8,!0]}],["rules"]:[{["conditions"]:I6,error:"S3 MRAP does not support dual-stack",["type"]:"error"},{["conditions"]:aR,error:"S3 MRAP does not support FIPS",["type"]:"error"},{["conditions"]:I8,error:"S3 MRAP does not support S3 Accelerate",["type"]:"error"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableMultiRegionAccessPoints"},!0]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",["type"]:"error"},{["conditions"]:[{["fn"]:"aws.partition",["argv"]:L8,["assign"]:"mrapPartition"}],["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"mrapPartition"},"name"]},{["fn"]:"getAttr",["argv"]:[Xf,"partition"]}]}],["rules"]:[{endpoint:{["url"]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",["properties"]:{["authSchemes"]:[{["disableDoubleEncoding"]:!0,name:"sigv4a",["signingName"]:"s3",["signingRegionSet"]:XY}]},["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",["type"]:"error"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Access Point Name",["type"]:"error"}],["type"]:"tree"},U6],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Y8,"s3-outposts"]}],["rules"]:[{["conditions"]:I6,error:"S3 Outposts does not support Dual-stack",["type"]:"error"},{["conditions"]:aR,error:"S3 Outposts does not support FIPS",["type"]:"error"},{["conditions"]:I8,error:"S3 Outposts does not support S3 Accelerate",["type"]:"error"},{["conditions"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",["type"]:"error"},{["conditions"]:[{["fn"]:"getAttr",["argv"]:SY,["assign"]:"outpostId"}],["rules"]:[{["conditions"]:C6,["rules"]:[Z8,{["conditions"]:P8,["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:k6,["rules"]:[{["conditions"]:B8,["rules"]:[{["conditions"]:K8,["rules"]:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:DY,["assign"]:"outpostType"}],["rules"]:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[Xf,"resourceId[3]"],["assign"]:"accessPointName"}],["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"outpostType"},"accesspoint"]}],["rules"]:[{["conditions"]:dR,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",["properties"]:H6,["headers"]:I},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:H6,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},{error:"Expected an outpost type `accesspoint`, found {outpostType}",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: expected an access point name",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: Expected a 4-component resource",["type"]:"error"}],["type"]:"tree"},M8],["type"]:"tree"},X8],["type"]:"tree"},S8],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: The Outpost Id was not set",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: No ARN type specified",["type"]:"error"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"substring",["argv"]:[y,0,4,!1],["assign"]:"arnPrefix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"arnPrefix"},"arn:"]},{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[Y6]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",["type"]:"error"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[HY,!0]},Y6],error:"Path-style addressing cannot be used with ARN buckets",["type"]:"error"},{["conditions"]:JY,["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:[p],["rules"]:[{["conditions"]:[b,w,k,n],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[b,w,k,j,t],["rules"]:[{endpoint:Z6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[b,w,k,j,ff],endpoint:Z6,["type"]:"endpoint"},{["conditions"]:[K,w,k,n],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[K,w,k,j,t],["rules"]:[{endpoint:J6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[K,w,k,j,ff],endpoint:J6,["type"]:"endpoint"},{["conditions"]:[b,w,P,n],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[b,w,P,j,t],["rules"]:[{endpoint:M6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[b,w,P,j,ff],endpoint:M6,["type"]:"endpoint"},{["conditions"]:[K,a,Mf,P,n],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[K,a,Mf,P,j,t],["rules"]:[{["conditions"]:uf,endpoint:D8,["type"]:"endpoint"},{endpoint:D8,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[K,a,Mf,P,j,ff],endpoint:D8,["type"]:"endpoint"},{["conditions"]:[K,w,P,n],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[K,w,P,j,t],["rules"]:[{["conditions"]:uf,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:o,["headers"]:I},["type"]:"endpoint"},{endpoint:X6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[K,w,P,j,ff],endpoint:X6,["type"]:"endpoint"}],["type"]:"tree"},{error:"Path-style addressing cannot be used with S3 Accelerate",["type"]:"error"}],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"isSet",["argv"]:[S6]},{["fn"]:"booleanEquals",["argv"]:[S6,!0]}],["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:s6,["rules"]:[G6,A6,{["conditions"]:dR,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:z8,["headers"]:I},["type"]:"endpoint"},{["conditions"]:aR,endpoint:{["url"]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:z8,["headers"]:I},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",["properties"]:z8,["headers"]:I},["type"]:"endpoint"}],["type"]:"tree"},_1],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[oW],["rules"]:[{["conditions"]:wf,["rules"]:[{["conditions"]:s6,["rules"]:[{["conditions"]:[k,b,w,n],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[k,b,w,j,t],["rules"]:[{endpoint:D6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[k,b,w,j,ff],endpoint:D6,["type"]:"endpoint"},{["conditions"]:[k,K,w,n],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[k,K,w,j,t],["rules"]:[{endpoint:z6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[k,K,w,j,ff],endpoint:z6,["type"]:"endpoint"},{["conditions"]:[P,b,w,n],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[P,b,w,j,t],["rules"]:[{endpoint:Q6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[P,b,w,j,ff],endpoint:Q6,["type"]:"endpoint"},{["conditions"]:[P,K,a,Mf,n],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[P,K,a,Mf,j,t],["rules"]:[{["conditions"]:uf,endpoint:Q8,["type"]:"endpoint"},{endpoint:Q8,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[P,K,a,Mf,j,ff],endpoint:Q8,["type"]:"endpoint"},{["conditions"]:[P,K,w,n],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:e,["headers"]:I},["type"]:"endpoint"},{["conditions"]:[P,K,w,j,t],["rules"]:[{["conditions"]:uf,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:o,["headers"]:I},["type"]:"endpoint"},{endpoint:L6,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[P,K,w,j,ff],endpoint:L6,["type"]:"endpoint"}],["type"]:"tree"},_1],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{error:"A region must be set when sending requests to S3.",["type"]:"error"}]},n6=zY;var IY=new iR.EndpointCache({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),d1=(f,R={})=>{return IY.get(f,()=>iR.resolveEndpoint(n6,{endpointParams:f,logger:R.logger}))};iR.customEndpointFunctions.aws=u6.awsEndpointFunctions;var wY=(f)=>async(R,h,$)=>{if(!$)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let G=await f(R,h,$),A=pR.getSmithyContext(h)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!A)throw Error(`getEndpointParameterInstructions() is not defined on \`${h.commandName}\``);let W=await e6.resolveParams($,{getEndpointParameterInstructions:A},R);return Object.assign(G,W)},qY=async(f,R,h)=>{return{operation:pR.getSmithyContext(R).operation,region:await pR.normalizeProvider(f.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},t6=wY(qY);function fF(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:f.region},propertiesExtractor:(R,h)=>({signingProperties:{config:R,context:h}})}}function RF(f){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:f.region},propertiesExtractor:(R,h)=>({signingProperties:{config:R,context:h}})}}var PY=(f,R,h)=>{return(G)=>{let W=f(G).properties?.authSchemes;if(!W)return R(G);let F=[];for(let N of W){let{name:U,properties:J={},...X}=N,z=U.toLowerCase();if(U!==z)console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${U}\` to \`${z}\``);let S;if(z==="sigv4a"){S="aws.auth#sigv4a";let i=W.find((yf)=>{let Of=yf.name.toLowerCase();return Of!=="sigv4a"&&Of.startsWith("sigv4")});if(!k1.CrtSignerV4&&i)continue}else if(z.startsWith("sigv4"))S="aws.auth#sigv4";else throw Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${z}\``);let B=h[S];if(!B)throw Error(`Could not find HttpAuthOption create function for \`${S}\``);let C=B(G);C.schemeId=S,C.signingProperties={...C.signingProperties||{},...X,...J},F.push(C)}return F}},BY=(f)=>{let R=[];switch(f.operation){default:R.push(fF(f)),R.push(RF(f))}return R},hF=PY(d1,BY,{"aws.auth#sigv4":fF,"aws.auth#sigv4a":RF}),$F=(f)=>{let R=a1.resolveAwsSdkSigV4Config(f),h=a1.resolveAwsSdkSigV4AConfig(R);return Object.assign(h,{authSchemePreference:pR.normalizeProvider(f.authSchemePreference??[])})};var A4=M(rR(),1),W4=M(Ih(),1),F4=M(Jf(),1);var GF=(f)=>{return Object.assign(f,{useFipsEndpoint:f.useFipsEndpoint??!1,useDualstackEndpoint:f.useDualstackEndpoint??!1,forcePathStyle:f.forcePathStyle??!1,useAccelerateEndpoint:f.useAccelerateEndpoint??!1,useGlobalEndpoint:f.useGlobalEndpoint??!1,disableMultiregionAccessPoints:f.disableMultiregionAccessPoints??!1,defaultSigningName:"s3"})},ef={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var df=M(Jf(),1);var AF=M(Jf(),1);class u extends AF.ServiceException{constructor(f){super(f);Object.setPrototypeOf(this,u.prototype)}}class i1 extends u{name="NoSuchUpload";$fault="client";constructor(f){super({name:"NoSuchUpload",$fault:"client",...f});Object.setPrototypeOf(this,i1.prototype)}}class r1 extends u{name="ObjectNotInActiveTierError";$fault="client";constructor(f){super({name:"ObjectNotInActiveTierError",$fault:"client",...f});Object.setPrototypeOf(this,r1.prototype)}}class p1 extends u{name="BucketAlreadyExists";$fault="client";constructor(f){super({name:"BucketAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,p1.prototype)}}class o1 extends u{name="BucketAlreadyOwnedByYou";$fault="client";constructor(f){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...f});Object.setPrototypeOf(this,o1.prototype)}}class n1 extends u{name="NoSuchBucket";$fault="client";constructor(f){super({name:"NoSuchBucket",$fault:"client",...f});Object.setPrototypeOf(this,n1.prototype)}}var y8;(function(f){f.visit=(R,h)=>{if(R.Prefix!==void 0)return h.Prefix(R.Prefix);if(R.Tag!==void 0)return h.Tag(R.Tag);if(R.And!==void 0)return h.And(R.And);return h._(R.$unknown[0],R.$unknown[1])}})(y8||(y8={}));var O8;(function(f){f.visit=(R,h)=>{if(R.Prefix!==void 0)return h.Prefix(R.Prefix);if(R.Tag!==void 0)return h.Tag(R.Tag);if(R.AccessPointArn!==void 0)return h.AccessPointArn(R.AccessPointArn);if(R.And!==void 0)return h.And(R.And);return h._(R.$unknown[0],R.$unknown[1])}})(O8||(O8={}));class u1 extends u{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(f){super({name:"InvalidObjectState",$fault:"client",...f});Object.setPrototypeOf(this,u1.prototype),this.StorageClass=f.StorageClass,this.AccessTier=f.AccessTier}}class e1 extends u{name="NoSuchKey";$fault="client";constructor(f){super({name:"NoSuchKey",$fault:"client",...f});Object.setPrototypeOf(this,e1.prototype)}}class t1 extends u{name="NotFound";$fault="client";constructor(f){super({name:"NotFound",$fault:"client",...f});Object.setPrototypeOf(this,t1.prototype)}}var KY=(f)=>({...f,...f.SecretAccessKey&&{SecretAccessKey:df.SENSITIVE_STRING},...f.SessionToken&&{SessionToken:df.SENSITIVE_STRING}}),WF=(f)=>({...f,...f.SSEKMSKeyId&&{SSEKMSKeyId:df.SENSITIVE_STRING},...f.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:df.SENSITIVE_STRING},...f.Credentials&&{Credentials:KY(f.Credentials)}}),FF=(f)=>({...f,...f.SSEKMSKeyId&&{SSEKMSKeyId:df.SENSITIVE_STRING},...f.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:df.SENSITIVE_STRING}});var NF=(f)=>({...f,...f.SSEKMSKeyId&&{SSEKMSKeyId:df.SENSITIVE_STRING}}),UF=(f)=>({...f,...f.SSECustomerKey&&{SSECustomerKey:df.SENSITIVE_STRING}});var PR=M(LR(),1);var l0=M(h8(),1),jY=M(Vf(),1),H=M(Jf(),1);var oR=M(Jf(),1);class fh extends u{name="EncryptionTypeMismatch";$fault="client";constructor(f){super({name:"EncryptionTypeMismatch",$fault:"client",...f});Object.setPrototypeOf(this,fh.prototype)}}class Rh extends u{name="InvalidRequest";$fault="client";constructor(f){super({name:"InvalidRequest",$fault:"client",...f});Object.setPrototypeOf(this,Rh.prototype)}}class hh extends u{name="InvalidWriteOffset";$fault="client";constructor(f){super({name:"InvalidWriteOffset",$fault:"client",...f});Object.setPrototypeOf(this,hh.prototype)}}class $h extends u{name="TooManyParts";$fault="client";constructor(f){super({name:"TooManyParts",$fault:"client",...f});Object.setPrototypeOf(this,$h.prototype)}}class Gh extends u{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(f){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...f});Object.setPrototypeOf(this,Gh.prototype)}}var HF;(function(f){f.visit=(R,h)=>{if(R.Records!==void 0)return h.Records(R.Records);if(R.Stats!==void 0)return h.Stats(R.Stats);if(R.Progress!==void 0)return h.Progress(R.Progress);if(R.Cont!==void 0)return h.Cont(R.Cont);if(R.End!==void 0)return h.End(R.End);return h._(R.$unknown[0],R.$unknown[1])}})(HF||(HF={}));var YF=(f)=>({...f,...f.SSEKMSKeyId&&{SSEKMSKeyId:oR.SENSITIVE_STRING},...f.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:oR.SENSITIVE_STRING}}),ZF=(f)=>({...f,...f.SSECustomerKey&&{SSECustomerKey:oR.SENSITIVE_STRING},...f.SSEKMSKeyId&&{SSEKMSKeyId:oR.SENSITIVE_STRING},...f.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:oR.SENSITIVE_STRING}});var qF=async(f,R)=>{let h=l0.requestBuilder(f,R),$=H.map({},H.isSerializableHeaderValue,{[nZ]:f[IZ],[d0]:f[s0],[a0]:f[_0],[zh]:f[Dh],[fR]:[()=>H.isSerializableHeaderValue(f[qR]),()=>f[qR].toString()]});h.bp("/"),h.p("Bucket",()=>f.Bucket,"{Bucket}",!1);let G=H.map({[aZ]:[,""]}),A;return h.m("GET").h($).q(G).b(A),h.build()};var PF=async(f,R)=>{let h=l0.requestBuilder(f,R),$=H.map({},H.isSerializableHeaderValue,{[pF]:f[mF],[EZ]:[()=>H.isSerializableHeaderValue(f[JF]),()=>H.dateToUtcString(f[JF]).toString()],[oF]:f[cF],[TZ]:[()=>H.isSerializableHeaderValue(f[MF]),()=>H.dateToUtcString(f[MF]).toString()],[bZ]:f[ZZ],[Qh]:f[Xh],[R4]:f[kF],[Lh]:f[Sh],[X3]:f[W3],[J3]:f[G3],[oZ]:f[tY]});h.bp("/{Key+}"),h.p("Bucket",()=>f.Bucket,"{Bucket}",!1),h.p("Key",()=>f.Key,"{Key+}",!0);let G=H.map({[G4]:[,"GetObject"],[xZ]:[,f[JZ]],[kZ]:[,f[MZ]],[lZ]:[,f[XZ]],[sZ]:[,f[SZ]],[_Z]:[,f[DZ]],[dZ]:[()=>f.ResponseExpires!==void 0,()=>H.dateToUtcString(f[zZ]).toString()],[rZ]:[,f[F3]],[mZ]:[()=>f.PartNumber!==void 0,()=>f[YZ].toString()]}),A;return h.m("GET").h($).q(G).b(A),h.build()};var BF=async(f,R)=>{let h=l0.requestBuilder(f,R),$=H.map({},H.isSerializableHeaderValue,{[X3]:f[W3],[J3]:f[G3],[RJ]:[()=>H.isSerializableHeaderValue(f[XF]),()=>(f[XF]||[]).map(H.quoteHeader).join(", ")]});h.bp("/"),h.p("Bucket",()=>f.Bucket,"{Bucket}",!1);let G=H.map({[gZ]:[,"2"],[jZ]:[,f[Nh]],[yZ]:[,f[Uh]],[CZ]:[()=>f.MaxKeys!==void 0,()=>f[Yh].toString()],[cZ]:[,f[wR]],[vZ]:[,f[Fh]],[VZ]:[()=>f.FetchOwner!==void 0,()=>f[GZ].toString()],[iZ]:[,f[Zh]]}),A;return h.m("GET").h($).q(G).b(A),h.build()};var KF=async(f,R)=>{let h=l0.requestBuilder(f,R),$=H.map({},H.isSerializableHeaderValue,{[iF]:f[CF]||"application/octet-stream",[pZ]:f[uY],[sF]:f[VF],[_F]:f[EF],[dF]:f[TF],[aF]:f[gF],[n8]:[()=>H.isSerializableHeaderValue(f[r8]),()=>f[r8].toString()],[BZ]:f[fZ],[GJ]:f[c0],[N3]:f[t8],[U3]:f[f3],[H3]:f[R3],[Y3]:f[h3],[Z3]:f[$3],[u8]:[()=>H.isSerializableHeaderValue(f[p8]),()=>H.dateToUtcString(f[p8]).toString()],[pF]:f[mF],[oF]:f[cF],[uZ]:f[AZ],[eZ]:f[WZ],[tZ]:f[FZ],[fJ]:f[NZ],[WJ]:[()=>H.isSerializableHeaderValue(f[SF]),()=>f[SF].toString()],[d0]:f[s0],[f4]:f[tf],[$4]:f[lF],[Qh]:f[Xh],[R4]:f[kF],[Lh]:f[Sh],[a0]:f[_0],[zh]:f[Dh],[fR]:[()=>H.isSerializableHeaderValue(f[qR]),()=>f[qR].toString()],[X3]:f[W3],[AJ]:f[wZ],[tF]:f[xF],[e8]:[()=>H.isSerializableHeaderValue(f[o8]),()=>H.serializeDateTime(f[o8]).toString()],[eF]:f[bF],[J3]:f[G3],...f.Metadata!==void 0&&Object.keys(f.Metadata).reduce((F,N)=>{return F[`x-amz-meta-${N.toLowerCase()}`]=f.Metadata[N],F},{})});h.bp("/{Key+}"),h.p("Bucket",()=>f.Bucket,"{Bucket}",!1),h.p("Key",()=>f.Key,"{Key+}",!0);let G=H.map({[G4]:[,"PutObject"]}),A,W;if(f.Body!==void 0)W=f.Body,A=W;return h.m("PUT").h($).q(G).b(A),h.build()};var vF=async(f,R)=>{if(f.statusCode!==200&&f.statusCode>=300)return Mh(f,R);let h=H.map({$metadata:Nf(f),[s0]:[,f.headers[d0]],[_0]:[,f.headers[a0]],[Dh]:[,f.headers[zh]],[qR]:[()=>f.headers[fR]!==void 0,()=>H.parseBoolean(f.headers[fR])]}),$=H.expectNonNull(H.expectObject(await PR.parseXmlBody(f.body,R)),"body");if($[T8]!=null)h[T8]=nY($[T8],R);return h};var jF=async(f,R)=>{if(f.statusCode!==200&&f.statusCode>=300)return Mh(f,R);let h=H.map({$metadata:Nf(f),[hZ]:[()=>f.headers[zF]!==void 0,()=>H.parseBoolean(f.headers[zF])],[eY]:[,f.headers[PZ]],[k0]:[,f.headers[uF]],[LZ]:[,f.headers[hJ]],[Hh]:[()=>f.headers[DF]!==void 0,()=>H.expectNonNull(H.parseRfc7231DateTime(f.headers[DF]))],[r8]:[()=>f.headers[n8]!==void 0,()=>H.strictParseLong(f.headers[n8])],[x0]:[,f.headers[rF]],[t8]:[,f.headers[N3]],[f3]:[,f.headers[U3]],[R3]:[,f.headers[H3]],[h3]:[,f.headers[Y3]],[$3]:[,f.headers[Z3]],[b0]:[,f.headers[nF]],[UZ]:[()=>f.headers[QF]!==void 0,()=>H.strictParseInt32(f.headers[QF])],[F3]:[,f.headers[h4]],[VF]:[,f.headers[sF]],[EF]:[,f.headers[_F]],[TF]:[,f.headers[dF]],[gF]:[,f.headers[aF]],[RZ]:[,f.headers[KZ]],[CF]:[,f.headers[iF]],[p8]:[()=>f.headers[u8]!==void 0,()=>H.expectNonNull(H.parseRfc7231DateTime(f.headers[u8]))],[$Z]:[,f.headers[OZ]],[lF]:[,f.headers[$4]],[s0]:[,f.headers[d0]],[Xh]:[,f.headers[Qh]],[Sh]:[,f.headers[Lh]],[_0]:[,f.headers[a0]],[qR]:[()=>f.headers[fR]!==void 0,()=>H.parseBoolean(f.headers[fR])],[tf]:[,f.headers[f4]],[A3]:[,f.headers[M3]],[QZ]:[,f.headers[$J]],[HZ]:[()=>f.headers[LF]!==void 0,()=>H.strictParseInt32(f.headers[LF])],[qZ]:[()=>f.headers[wF]!==void 0,()=>H.strictParseInt32(f.headers[wF])],[xF]:[,f.headers[tF]],[o8]:[()=>f.headers[e8]!==void 0,()=>H.expectNonNull(H.parseRfc3339DateTimeWithOffset(f.headers[e8]))],[bF]:[,f.headers[eF]],Metadata:[,Object.keys(f.headers).filter((G)=>G.startsWith("x-amz-meta-")).reduce((G,A)=>{return G[A.substring(11)]=f.headers[A],G},{})]}),$=f.body;return R.sdkStreamMixin($),h.Body=$,h};var yF=async(f,R)=>{if(f.statusCode!==200&&f.statusCode>=300)return Mh(f,R);let h=H.map({$metadata:Nf(f),[A3]:[,f.headers[M3]]}),$=H.expectNonNull(H.expectObject(await PR.parseXmlBody(f.body,R)),"body");if($.CommonPrefixes==="")h[Ah]=[];else if($[Ah]!=null)h[Ah]=aY(H.getArrayIfSingleItem($[Ah]),R);if($.Contents==="")h[Wh]=[];else if($[Wh]!=null)h[Wh]=rY(H.getArrayIfSingleItem($[Wh]),R);if($[Fh]!=null)h[Fh]=H.expectString($[Fh]);if($[Nh]!=null)h[Nh]=H.expectString($[Nh]);if($[Uh]!=null)h[Uh]=H.expectString($[Uh]);if($[c8]!=null)h[c8]=H.parseBoolean($[c8]);if($[x8]!=null)h[x8]=H.strictParseInt32($[x8]);if($[Yh]!=null)h[Yh]=H.strictParseInt32($[Yh]);if($[k8]!=null)h[k8]=H.expectString($[k8]);if($[l8]!=null)h[l8]=H.expectString($[l8]);if($[wR]!=null)h[wR]=H.expectString($[wR]);if($[Zh]!=null)h[Zh]=H.expectString($[Zh]);return h};var OF=async(f,R)=>{if(f.statusCode!==200&&f.statusCode>=300)return Mh(f,R);let h=H.map({$metadata:Nf(f),[k0]:[,f.headers[uF]],[x0]:[,f.headers[rF]],[t8]:[,f.headers[N3]],[f3]:[,f.headers[U3]],[R3]:[,f.headers[H3]],[h3]:[,f.headers[Y3]],[$3]:[,f.headers[Z3]],[b0]:[,f.headers[nF]],[s0]:[,f.headers[d0]],[F3]:[,f.headers[h4]],[Xh]:[,f.headers[Qh]],[Sh]:[,f.headers[Lh]],[_0]:[,f.headers[a0]],[Dh]:[,f.headers[zh]],[qR]:[()=>f.headers[fR]!==void 0,()=>H.parseBoolean(f.headers[fR])],[Jh]:[()=>f.headers[IF]!==void 0,()=>H.strictParseLong(f.headers[IF])],[A3]:[,f.headers[M3]]});return await H.collectBody(f.body,R),h};var Mh=async(f,R)=>{let h={...f,body:await PR.parseXmlErrorBody(f.body,R)},$=PR.loadRestXmlErrorCode(f,h.body);switch($){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":throw await bY(h,R);case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":throw await lY(h,R);case"BucketAlreadyExists":case"com.amazonaws.s3#BucketAlreadyExists":throw await OY(h,R);case"BucketAlreadyOwnedByYou":case"com.amazonaws.s3#BucketAlreadyOwnedByYou":throw await VY(h,R);case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await mY(h,R);case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":throw await TY(h,R);case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await cY(h,R);case"NotFound":case"com.amazonaws.s3#NotFound":throw await xY(h,R);case"EncryptionTypeMismatch":case"com.amazonaws.s3#EncryptionTypeMismatch":throw await EY(h,R);case"InvalidRequest":case"com.amazonaws.s3#InvalidRequest":throw await gY(h,R);case"InvalidWriteOffset":case"com.amazonaws.s3#InvalidWriteOffset":throw await CY(h,R);case"TooManyParts":case"com.amazonaws.s3#TooManyParts":throw await sY(h,R);case"ObjectAlreadyInActiveTierError":case"com.amazonaws.s3#ObjectAlreadyInActiveTierError":throw await kY(h,R);default:let G=h.body;return yY({output:f,parsedBody:G,errorCode:$})}},yY=H.withBaseException(u),OY=async(f,R)=>{let h=H.map({}),$=f.body,G=new p1({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},VY=async(f,R)=>{let h=H.map({}),$=f.body,G=new o1({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},EY=async(f,R)=>{let h=H.map({}),$=f.body,G=new fh({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},TY=async(f,R)=>{let h=H.map({}),$=f.body;if($[E8]!=null)h[E8]=H.expectString($[E8]);if($[tf]!=null)h[tf]=H.expectString($[tf]);let G=new u1({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},gY=async(f,R)=>{let h=H.map({}),$=f.body,G=new Rh({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},CY=async(f,R)=>{let h=H.map({}),$=f.body,G=new hh({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},mY=async(f,R)=>{let h=H.map({}),$=f.body,G=new n1({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},cY=async(f,R)=>{let h=H.map({}),$=f.body,G=new e1({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},bY=async(f,R)=>{let h=H.map({}),$=f.body,G=new i1({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},xY=async(f,R)=>{let h=H.map({}),$=f.body,G=new t1({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},kY=async(f,R)=>{let h=H.map({}),$=f.body,G=new Gh({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},lY=async(f,R)=>{let h=H.map({}),$=f.body,G=new r1({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)},sY=async(f,R)=>{let h=H.map({}),$=f.body,G=new $h({$metadata:Nf(f),...h});return H.decorateServiceException(G,f.body)};var _Y=(f,R)=>{return(f||[]).filter((h)=>h!=null).map((h)=>{return H.expectString(h)})},dY=(f,R)=>{let h={};if(f[wR]!=null)h[wR]=H.expectString(f[wR]);return h},aY=(f,R)=>{return(f||[]).filter((h)=>h!=null).map((h)=>{return dY(h,R)})};var iY=(f,R)=>{let h={};if(f[b8]!=null)h[b8]=H.expectString(f[b8]);if(f[Hh]!=null)h[Hh]=H.expectNonNull(H.parseRfc3339DateTimeWithOffset(f[Hh]));if(f[x0]!=null)h[x0]=H.expectString(f[x0]);if(f.ChecksumAlgorithm==="")h[c0]=[];else if(f[c0]!=null)h[c0]=_Y(H.getArrayIfSingleItem(f[c0]),R);if(f[b0]!=null)h[b0]=H.expectString(f[b0]);if(f[Jh]!=null)h[Jh]=H.strictParseLong(f[Jh]);if(f[tf]!=null)h[tf]=H.expectString(f[tf]);if(f[s8]!=null)h[s8]=pY(f[s8],R);if(f[d8]!=null)h[d8]=oY(f[d8],R);return h},rY=(f,R)=>{return(f||[]).filter((h)=>h!=null).map((h)=>{return iY(h,R)})};var pY=(f,R)=>{let h={};if(f[g8]!=null)h[g8]=H.expectString(f[g8]);if(f[C8]!=null)h[C8]=H.expectString(f[C8]);return h};var oY=(f,R)=>{let h={};if(f[m8]!=null)h[m8]=H.parseBoolean(f[m8]);if(f[_8]!=null)h[_8]=H.expectNonNull(H.parseRfc3339DateTimeWithOffset(f[_8]));return h};var nY=(f,R)=>{let h={};if(f[V8]!=null)h[V8]=H.expectString(f[V8]);if(f[a8]!=null)h[a8]=H.expectString(f[a8]);if(f[i8]!=null)h[i8]=H.expectString(f[i8]);if(f[k0]!=null)h[k0]=H.expectNonNull(H.parseRfc3339DateTimeWithOffset(f[k0]));return h};var Nf=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var uY="ACL";var V8="AccessKeyId";var eY="AcceptRanges";var E8="AccessTier";var qR="BucketKeyEnabled";var T8="Credentials",c0="ChecksumAlgorithm";var VF="CacheControl",t8="ChecksumCRC32",f3="ChecksumCRC32C",R3="ChecksumCRC64NVME",EF="ContentDisposition";var TF="ContentEncoding";var gF="ContentLanguage",r8="ContentLength",tY="ChecksumMode",fZ="ContentMD5";var Ah="CommonPrefixes";var RZ="ContentRange";var h3="ChecksumSHA1",$3="ChecksumSHA256";var b0="ChecksumType",CF="ContentType";var Fh="ContinuationToken";var Wh="Contents";var Nh="Delimiter";var hZ="DeleteMarker";var g8="DisplayName";var p8="Expires";var G3="ExpectedBucketOwner";var $Z="ExpiresString";var Uh="EncodingType",x0="ETag";var k0="Expiration";var GZ="FetchOwner";var AZ="GrantFullControl";var WZ="GrantRead",FZ="GrantReadACP";var NZ="GrantWriteACP";var C8="ID";var mF="IfMatch";var JF="IfModifiedSince",cF="IfNoneMatch";var m8="IsRestoreInProgress";var c8="IsTruncated";var MF="IfUnmodifiedSince";var b8="Key",x8="KeyCount";var Hh="LastModified";var Yh="MaxKeys";var UZ="MissingMeta";var k8="Name";var l8="NextContinuationToken";var s8="Owner";var bF="ObjectLockLegalHoldStatus",xF="ObjectLockMode";var o8="ObjectLockRetainUntilDate";var XF="OptionalObjectAttributes";var wR="Prefix";var HZ="PartsCount";var YZ="PartNumber";var ZZ="Range";var A3="RequestCharged",JZ="ResponseCacheControl",MZ="ResponseContentDisposition",XZ="ResponseContentEncoding",SZ="ResponseContentLanguage",DZ="ResponseContentType";var zZ="ResponseExpires",_8="RestoreExpiryDate";var W3="RequestPayer";var QZ="ReplicationStatus",d8="RestoreStatus";var LZ="Restore";var Zh="StartAfter",a8="SecretAccessKey";var tf="StorageClass";var IZ="SessionMode";var s0="ServerSideEncryption";var Xh="SSECustomerAlgorithm",kF="SSECustomerKey",Sh="SSECustomerKeyMD5";var Dh="SSEKMSEncryptionContext",_0="SSEKMSKeyId";var i8="SessionToken";var Jh="Size";var wZ="Tagging";var qZ="TagCount";var F3="VersionId";var SF="WriteOffsetBytes",lF="WebsiteRedirectLocation";var PZ="accept-ranges";var sF="cache-control",_F="content-disposition",dF="content-encoding",aF="content-language",n8="content-length",BZ="content-md5",KZ="content-range",iF="content-type",vZ="continuation-token";var jZ="delimiter",u8="expires";var yZ="encoding-type",rF="etag",OZ="expiresstring",VZ="fetch-owner";var pF="if-match",EZ="if-modified-since";var oF="if-none-match";var TZ="if-unmodified-since";var DF="last-modified";var gZ="list-type";var CZ="max-keys";var mZ="partNumber";var cZ="prefix";var bZ="range",xZ="response-cache-control",kZ="response-content-disposition",lZ="response-content-encoding",sZ="response-content-language",_Z="response-content-type",dZ="response-expires";var aZ="session",iZ="start-after";var rZ="versionId";var pZ="x-amz-acl";var N3="x-amz-checksum-crc32",U3="x-amz-checksum-crc32c",H3="x-amz-checksum-crc64nvme",oZ="x-amz-checksum-mode";var Y3="x-amz-checksum-sha1",Z3="x-amz-checksum-sha256";var nZ="x-amz-create-session-mode";var nF="x-amz-checksum-type",zF="x-amz-delete-marker",uF="x-amz-expiration",J3="x-amz-expected-bucket-owner";var uZ="x-amz-grant-full-control",eZ="x-amz-grant-read",tZ="x-amz-grant-read-acp";var fJ="x-amz-grant-write-acp";var QF="x-amz-missing-meta";var LF="x-amz-mp-parts-count";var eF="x-amz-object-lock-legal-hold",tF="x-amz-object-lock-mode",e8="x-amz-object-lock-retain-until-date";var RJ="x-amz-optional-object-attributes",IF="x-amz-object-size";var hJ="x-amz-restore",M3="x-amz-request-charged";var X3="x-amz-request-payer";var $J="x-amz-replication-status";var f4="x-amz-storage-class",GJ="x-amz-sdk-checksum-algorithm";var d0="x-amz-server-side-encryption",a0="x-amz-server-side-encryption-aws-kms-key-id",fR="x-amz-server-side-encryption-bucket-key-enabled",zh="x-amz-server-side-encryption-context",Qh="x-amz-server-side-encryption-customer-algorithm",R4="x-amz-server-side-encryption-customer-key",Lh="x-amz-server-side-encryption-customer-key-md5",AJ="x-amz-tagging",wF="x-amz-tagging-count";var h4="x-amz-version-id",WJ="x-amz-write-offset-bytes",$4="x-amz-website-redirect-location",G4="x-id";class S3 extends F4.Command.classBuilder().ep({...ef,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(f,R,h,$){return[W4.getSerdePlugin(h,this.serialize,this.deserialize),A4.getEndpointPlugin(h,f.getEndpointParameterInstructions()),lR(h)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").f(FF,WF).ser(qF).de(vF).build(){}var N4={name:"@aws-sdk/client-s3",description:"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",version:"3.797.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-s3","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo s3",test:"yarn g:vitest run","test:browser":"node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.ts","test:browser:watch":"node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.ts","test:e2e":"yarn g:vitest run -c vitest.config.e2e.ts && yarn test:browser","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.ts","test:watch":"yarn g:vitest watch"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha1-browser":"5.2.0","@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.796.0","@aws-sdk/credential-provider-node":"3.797.0","@aws-sdk/middleware-bucket-endpoint":"3.775.0","@aws-sdk/middleware-expect-continue":"3.775.0","@aws-sdk/middleware-flexible-checksums":"3.796.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-location-constraint":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-sdk-s3":"3.796.0","@aws-sdk/middleware-ssec":"3.775.0","@aws-sdk/middleware-user-agent":"3.796.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/signature-v4-multi-region":"3.796.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.787.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.796.0","@aws-sdk/xml-builder":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/eventstream-serde-browser":"^4.0.2","@smithy/eventstream-serde-config-resolver":"^4.1.0","@smithy/eventstream-serde-node":"^4.0.2","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-blob-browser":"^4.0.2","@smithy/hash-node":"^4.0.2","@smithy/hash-stream-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/md5-js":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-stream":"^4.2.0","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.3",tslib:"^2.6.2"},devDependencies:{"@aws-sdk/signature-v4-crt":"3.796.0","@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-s3"}};var Oh=M(LR(),1);var RR=M(H4(),1),S4=M(NJ(),1);var wh=M(H4(),1),U4="AWS_EC2_METADATA_DISABLED",Y4=async(f)=>{let{ENV_CMDS_FULL_URI:R,ENV_CMDS_RELATIVE_URI:h,fromContainerMetadata:$,fromInstanceMetadata:G}=await import("../chunk-9fw11v51.js");if(process.env[h]||process.env[R]){f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:A}=await import("../chunk-qardppq0.js");return wh.chain(A(f),$(f))}if(process.env[U4]&&process.env[U4]!=="false")return async()=>{throw new wh.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:f.logger})};return f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),G(f)};var Z4=!1,D4=(f={})=>RR.memoize(RR.chain(async()=>{if(f.profile??process.env[S4.ENV_PROFILE]){if(process.env[J4]&&process.env[M4]){if(!Z4)(f.logger?.warn&&f.logger?.constructor?.name!=="NoOpLogger"?f.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
46
46
  Multiple credential sources detected:
47
47
  Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
48
48
  This SDK will proceed with the AWS_PROFILE value.
@@ -50,7 +50,7 @@ For more information please go to https://github.com/aws/aws-sdk-js-v3#functiona
50
50
  However, a future version may change this behavior to prefer the ENV static credentials.
51
51
  Please ensure that your environment only sets either the AWS_PROFILE or the
52
52
  AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
53
- `),Z4=!0}throw new RR.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:f.logger,tryNextLink:!0})}return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),X4(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:R,ssoAccountId:h,ssoRegion:$,ssoRoleName:G,ssoSession:A}=f;if(!R&&!h&&!$&&!G&&!A)throw new RR.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:f.logger});let{fromSSO:W}=await import("../chunk-f4nce88x.js");return W(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:R}=await import("../chunk-3fr5vy3a.js");return R(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:R}=await import("../chunk-bmrn519y.js");return R(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:R}=await import("../chunk-je7fyx2e.js");return R(f)()},async()=>{return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Y4(f))()},async()=>{throw new RR.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:f.logger})}),HJ,UJ),UJ=(f)=>f?.expiration!==void 0,HJ=(f)=>f?.expiration!==void 0&&f.expiration.getTime()-Date.now()<300000;var z4=M(t$(),1);var nR=M(t$(),1),YJ="AWS_S3_USE_ARN_REGION",ZJ="s3_use_arn_region",Q4={environmentVariableSelector:(f)=>nR.booleanSelector(f,YJ,nR.SelectorType.ENV),configFileSelector:(f)=>nR.booleanSelector(f,ZJ,nR.SelectorType.CONFIG),default:!1};var wJ=M(Vf(),1);var Vh=M(kJ(),1),GR=M(m4(),1);var hR=M(I4(),1);var w4=M(I4(),1);class uR{constructor(f){if(this.bytes=f,f.byteLength!==8)throw Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(f){if(f>9223372036854776000||f<-9223372036854776000)throw Error(`${f} is too large (or, if negative, too small) to represent as an Int64`);let R=new Uint8Array(8);for(let h=7,$=Math.abs(Math.round(f));h>-1&&$>0;h--,$/=256)R[h]=$;if(f<0)L4(R);return new uR(R)}valueOf(){let f=this.bytes.slice(0),R=f[0]&128;if(R)L4(f);return parseInt(w4.toHex(f),16)*(R?-1:1)}toString(){return String(this.valueOf())}}function L4(f){for(let R=0;R<8;R++)f[R]^=255;for(let R=7;R>-1;R--)if(f[R]++,f[R]!==0)break}class D3{constructor(f,R){this.toUtf8=f,this.fromUtf8=R}format(f){let R=[];for(let G of Object.keys(f)){let A=this.fromUtf8(G);R.push(Uint8Array.from([A.byteLength]),A,this.formatHeaderValue(f[G]))}let h=new Uint8Array(R.reduce((G,A)=>G+A.byteLength,0)),$=0;for(let G of R)h.set(G,$),$+=G.byteLength;return h}formatHeaderValue(f){switch(f.type){case"boolean":return Uint8Array.from([f.value?0:1]);case"byte":return Uint8Array.from([2,f.value]);case"short":let R=new DataView(new ArrayBuffer(3));return R.setUint8(0,3),R.setInt16(1,f.value,!1),new Uint8Array(R.buffer);case"integer":let h=new DataView(new ArrayBuffer(5));return h.setUint8(0,4),h.setInt32(1,f.value,!1),new Uint8Array(h.buffer);case"long":let $=new Uint8Array(9);return $[0]=5,$.set(f.value.bytes,1),$;case"binary":let G=new DataView(new ArrayBuffer(3+f.value.byteLength));G.setUint8(0,6),G.setUint16(1,f.value.byteLength,!1);let A=new Uint8Array(G.buffer);return A.set(f.value,3),A;case"string":let W=this.fromUtf8(f.value),F=new DataView(new ArrayBuffer(3+W.byteLength));F.setUint8(0,7),F.setUint16(1,W.byteLength,!1);let N=new Uint8Array(F.buffer);return N.set(W,3),N;case"timestamp":let U=new Uint8Array(9);return U[0]=8,U.set(uR.fromNumber(f.value.valueOf()).bytes,1),U;case"uuid":if(!VJ.test(f.value))throw Error(`Invalid UUID received: ${f.value}`);let J=new Uint8Array(17);return J[0]=9,J.set(hR.fromHex(f.value.replace(/\-/g,"")),1),J}}parse(f){let R={},h=0;while(h<f.byteLength){let $=f.getUint8(h++),G=this.toUtf8(new Uint8Array(f.buffer,f.byteOffset+h,$));switch(h+=$,f.getUint8(h++)){case 0:R[G]={type:P4,value:!0};break;case 1:R[G]={type:P4,value:!1};break;case 2:R[G]={type:qJ,value:f.getInt8(h++)};break;case 3:R[G]={type:PJ,value:f.getInt16(h,!1)},h+=2;break;case 4:R[G]={type:BJ,value:f.getInt32(h,!1)},h+=4;break;case 5:R[G]={type:KJ,value:new uR(new Uint8Array(f.buffer,f.byteOffset+h,8))},h+=8;break;case 6:let A=f.getUint16(h,!1);h+=2,R[G]={type:vJ,value:new Uint8Array(f.buffer,f.byteOffset+h,A)},h+=A;break;case 7:let W=f.getUint16(h,!1);h+=2,R[G]={type:jJ,value:this.toUtf8(new Uint8Array(f.buffer,f.byteOffset+h,W))},h+=W;break;case 8:R[G]={type:yJ,value:new Date(new uR(new Uint8Array(f.buffer,f.byteOffset+h,8)).valueOf())},h+=8;break;case 9:let F=new Uint8Array(f.buffer,f.byteOffset+h,16);h+=16,R[G]={type:OJ,value:`${hR.toHex(F.subarray(0,4))}-${hR.toHex(F.subarray(4,6))}-${hR.toHex(F.subarray(6,8))}-${hR.toHex(F.subarray(8,10))}-${hR.toHex(F.subarray(10))}`};break;default:throw Error("Unrecognized header type tag")}}return R}}var q4;(function(f){f[f.boolTrue=0]="boolTrue",f[f.boolFalse=1]="boolFalse",f[f.byte=2]="byte",f[f.short=3]="short",f[f.integer=4]="integer",f[f.long=5]="long",f[f.byteArray=6]="byteArray",f[f.string=7]="string",f[f.timestamp=8]="timestamp",f[f.uuid=9]="uuid"})(q4||(q4={}));var P4="boolean",qJ="byte",PJ="short",BJ="integer",KJ="long",vJ="binary",jJ="string",yJ="timestamp",OJ="uuid",VJ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var B4=4,$R=B4*2,KR=4,EJ=$R+KR*2;function K4({byteLength:f,byteOffset:R,buffer:h}){if(f<EJ)throw Error("Provided message too short to accommodate event stream message overhead");let $=new DataView(h,R,f),G=$.getUint32(0,!1);if(f!==G)throw Error("Reported message length does not match received message length");let A=$.getUint32(B4,!1),W=$.getUint32($R,!1),F=$.getUint32(f-KR,!1),N=new QR().update(new Uint8Array(h,R,$R));if(W!==N.digest())throw Error(`The prelude checksum specified in the message (${W}) does not match the calculated CRC32 checksum (${N.digest()})`);if(N.update(new Uint8Array(h,R+$R,f-($R+KR))),F!==N.digest())throw Error(`The message checksum (${N.digest()}) did not match the expected value of ${F}`);return{headers:new DataView(h,R+$R+KR,A),body:new Uint8Array(h,R+$R+KR+A,G-A-($R+KR+KR))}}class z3{constructor(f,R){this.headerMarshaller=new D3(f,R),this.messageBuffer=[],this.isEndOfStream=!1}feed(f){this.messageBuffer.push(this.decode(f))}endOfStream(){this.isEndOfStream=!0}getMessage(){let f=this.messageBuffer.pop(),R=this.isEndOfStream;return{getMessage(){return f},isEndOfStream(){return R}}}getAvailableMessages(){let f=this.messageBuffer;this.messageBuffer=[];let R=this.isEndOfStream;return{getMessages(){return f},isEndOfStream(){return R}}}encode({headers:f,body:R}){let h=this.headerMarshaller.format(f),$=h.byteLength+R.byteLength+16,G=new Uint8Array($),A=new DataView(G.buffer,G.byteOffset,G.byteLength),W=new QR;return A.setUint32(0,$,!1),A.setUint32(4,h.byteLength,!1),A.setUint32(8,W.update(G.subarray(0,8)).digest(),!1),G.set(h,12),G.set(R,h.byteLength+12),A.setUint32($-4,W.update(G.subarray(8,$-4)).digest(),!1),G}decode(f){let{headers:R,body:h}=K4(f);return{headers:this.headerMarshaller.parse(R),body:h}}formatHeaders(f){return this.headerMarshaller.format(f)}}class Q3{constructor(f){this.options=f}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let f of this.options.inputStream)yield this.options.decoder.decode(f)}}class L3{constructor(f){this.options=f}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let f of this.options.messageStream)yield this.options.encoder.encode(f);if(this.options.includeEndFrame)yield new Uint8Array(0)}}class I3{constructor(f){this.options=f}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let f of this.options.messageStream){let R=await this.options.deserializer(f);if(R===void 0)continue;yield R}}}class w3{constructor(f){this.options=f}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let f of this.options.inputStream)yield this.options.serializer(f)}}function v4(f){let R=0,h=0,$=null,G=null,A=(F)=>{if(typeof F!=="number")throw Error("Attempted to allocate an event message where size was not a number: "+F);R=F,h=4,$=new Uint8Array(F),new DataView($.buffer).setUint32(0,F,!1)},W=async function*(){let F=f[Symbol.asyncIterator]();while(!0){let{value:N,done:U}=await F.next();if(U){if(!R)return;else if(R===h)yield $;else throw Error("Truncated event message received.");return}let J=N.length,X=0;while(X<J){if(!$){let S=J-X;if(!G)G=new Uint8Array(4);let B=Math.min(4-h,S);if(G.set(N.slice(X,X+B),h),h+=B,X+=B,h<4)break;A(new DataView(G.buffer).getUint32(0,!1)),G=null}let z=Math.min(R-h,J-X);if($.set(N.slice(X,X+z),h),h+=z,X+=z,R&&R===h)yield $,$=null,R=0,h=0}}};return{[Symbol.asyncIterator]:W}}function j4(f,R){return async function(h){let{value:$}=h.headers[":message-type"];if($==="error"){let G=Error(h.headers[":error-message"].value||"UnknownError");throw G.name=h.headers[":error-code"].value,G}else if($==="exception"){let G=h.headers[":exception-type"].value,A={[G]:h},W=await f(A);if(W.$unknown){let F=Error(R(h.body));throw F.name=G,F}throw W[G]}else if($==="event"){let G={[h.headers[":event-type"].value]:h},A=await f(G);if(A.$unknown)return;return A}else throw Error(`Unrecognizable event type: ${h.headers[":event-type"].value}`)}}class qh{constructor({utf8Encoder:f,utf8Decoder:R}){this.eventStreamCodec=new z3(f,R),this.utfEncoder=f}deserialize(f,R){let h=v4(f);return new I3({messageStream:new Q3({inputStream:h,decoder:this.eventStreamCodec}),deserializer:j4(R,this.utfEncoder)})}serialize(f,R){return new L3({messageStream:new w3({inputStream:f,serializer:R}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}import{Readable as TJ}from"stream";async function*y4(f){let R=!1,h=!1,$=[];f.on("error",(G)=>{if(!R)R=!0;if(G)throw G}),f.on("data",(G)=>{$.push(G)}),f.on("end",()=>{R=!0});while(!h){let G=await new Promise((A)=>setTimeout(()=>A($.shift()),0));if(G)yield G;h=R&&$.length===0}}class q3{constructor({utf8Encoder:f,utf8Decoder:R}){this.universalMarshaller=new qh({utf8Decoder:R,utf8Encoder:f})}deserialize(f,R){let h=typeof f[Symbol.asyncIterator]==="function"?f:y4(f);return this.universalMarshaller.deserialize(h,R)}serialize(f,R){return TJ.from(this.universalMarshaller.serialize(f,R))}}var O4=(f)=>new q3(f);var yh=M(lJ(),1);var V4=M(n$(),1);import{Writable as gJ}from"stream";class Ph extends gJ{constructor(f,R){super(R);this.hash=f}_write(f,R,h){try{this.hash.update(V4.toUint8Array(f))}catch($){return h($)}h()}}var E4=(f,R)=>{if(R.readableFlowing!==null)throw Error("Unable to calculate hash for flowing readable stream");let h=new f,$=new Ph(h);return R.pipe($),new Promise((G,A)=>{R.on("error",(W)=>{$.end(),A(W)}),$.on("error",A),$.on("finish",()=>{h.digest().then(G).catch(A)})})};var Eh=M(c4(),1),Pf=M(bJ(),1),Th=M(cJ(),1),b4=M(sJ(),1),x4=M(xJ(),1);var Bh=M(LR(),1);var T4=M(Jf(),1),g4=M(mJ(),1),Kh=M(CJ(),1),vh=M(g1(),1),jh=M(n$(),1);var C4=(f)=>{return{apiVersion:"2006-03-01",base64Decoder:f?.base64Decoder??Kh.fromBase64,base64Encoder:f?.base64Encoder??Kh.toBase64,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??d1,extensions:f?.extensions??[],getAwsChunkedEncodingStream:f?.getAwsChunkedEncodingStream??vh.getAwsChunkedEncodingStream,httpAuthSchemeProvider:f?.httpAuthSchemeProvider??hF,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(R)=>R.getIdentityProvider("aws.auth#sigv4"),signer:new Bh.AwsSdkSigV4Signer},{schemeId:"aws.auth#sigv4a",identityProvider:(R)=>R.getIdentityProvider("aws.auth#sigv4a"),signer:new Bh.AwsSdkSigV4ASigner}],logger:f?.logger??new T4.NoOpLogger,sdkStreamMixin:f?.sdkStreamMixin??vh.sdkStreamMixin,serviceId:f?.serviceId??"S3",signerConstructor:f?.signerConstructor??A8,signingEscapePath:f?.signingEscapePath??!1,urlParser:f?.urlParser??g4.parseUrl,useArnRegion:f?.useArnRegion??!1,utf8Decoder:f?.utf8Decoder??jh.fromUtf8,utf8Encoder:f?.utf8Encoder??jh.toUtf8}};var k4=M(Jf(),1),l4=M(_J(),1),s4=M(Jf(),1),_4=(f)=>{s4.emitWarningIfUnsupportedVersion(process.version);let R=l4.resolveDefaultsModeConfig(f),h=()=>R().then(k4.loadConfigsForDefaultMode),$=C4(f);Oh.emitWarningIfUnsupportedVersion(process.version);let G={profile:f?.profile};return{...$,...f,runtime:"node",defaultsMode:R,bodyLengthChecker:f?.bodyLengthChecker??b4.calculateBodyLength,credentialDefaultProvider:f?.credentialDefaultProvider??D4,defaultUserAgentProvider:f?.defaultUserAgentProvider??Vh.createDefaultUserAgentProvider({serviceId:$.serviceId,clientVersion:N4.version}),disableS3ExpressSessionAuth:f?.disableS3ExpressSessionAuth??Pf.loadConfig(f8,G),eventStreamSerdeProvider:f?.eventStreamSerdeProvider??O4,maxAttempts:f?.maxAttempts??Pf.loadConfig(Eh.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,f),md5:f?.md5??yh.Hash.bind(null,"md5"),region:f?.region??Pf.loadConfig(GR.NODE_REGION_CONFIG_OPTIONS,{...GR.NODE_REGION_CONFIG_FILE_OPTIONS,...G}),requestChecksumCalculation:f?.requestChecksumCalculation??Pf.loadConfig(xA,G),requestHandler:Th.NodeHttpHandler.create(f?.requestHandler??h),responseChecksumValidation:f?.responseChecksumValidation??Pf.loadConfig(kA,G),retryMode:f?.retryMode??Pf.loadConfig({...Eh.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await h()).retryMode||x4.DEFAULT_RETRY_MODE},f),sha1:f?.sha1??yh.Hash.bind(null,"sha1"),sha256:f?.sha256??yh.Hash.bind(null,"sha256"),sigv4aSigningRegionSet:f?.sigv4aSigningRegionSet??Pf.loadConfig(Oh.NODE_SIGV4A_CONFIG_OPTIONS,G),streamCollector:f?.streamCollector??Th.streamCollector,streamHasher:f?.streamHasher??E4,useArnRegion:f?.useArnRegion??Pf.loadConfig(Q4,G),useDualstackEndpoint:f?.useDualstackEndpoint??Pf.loadConfig(GR.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,G),useFipsEndpoint:f?.useFipsEndpoint??Pf.loadConfig(GR.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,G),userAgentAppId:f?.userAgentAppId??Pf.loadConfig(Vh.NODE_APP_ID_CONFIG_OPTIONS,G)}};var gh=M(dJ(),1),Ch=M(Vf(),1),mh=M(Jf(),1);var d4=(f)=>{let{httpAuthSchemes:R,httpAuthSchemeProvider:h,credentials:$}=f;return{setHttpAuthScheme(G){let A=R.findIndex((W)=>W.schemeId===G.schemeId);if(A===-1)R.push(G);else R.splice(A,1,G)},httpAuthSchemes(){return R},setHttpAuthSchemeProvider(G){h=G},httpAuthSchemeProvider(){return h},setCredentials(G){$=G},credentials(){return $}}},a4=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var i4=(f,R)=>{let h=Object.assign(gh.getAwsRegionExtensionConfiguration(f),mh.getDefaultExtensionConfiguration(f),Ch.getHttpHandlerExtensionConfiguration(f),d4(f));return R.forEach(($)=>$.configure(h)),Object.assign(f,gh.resolveAwsRegionExtensionConfiguration(h),mh.resolveDefaultRuntimeConfig(h),Ch.resolveHttpHandlerRuntimeConfig(h),a4(h))};class P3 extends e4.Client{config;constructor(...[f]){let R=_4(f||{});super(R);this.initConfig=R;let h=GF(R),$=bh.resolveUserAgentConfig(h),G=YW($),A=xh.resolveRetryConfig(G),W=o4.resolveRegionConfig(A),F=ch.resolveHostHeaderConfig(W),N=u4.resolveEndpointConfig(F),U=lW(N),J=$F(U),X=mW(J,{session:[()=>this,S3]}),z=i4(X,f?.extensions||[]);this.config=z,this.middlewareStack.use(bh.getUserAgentPlugin(this.config)),this.middlewareStack.use(xh.getRetryPlugin(this.config)),this.middlewareStack.use(n4.getContentLengthPlugin(this.config)),this.middlewareStack.use(ch.getHostHeaderPlugin(this.config)),this.middlewareStack.use(r4.getLoggerPlugin(this.config)),this.middlewareStack.use(p4.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(eR.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:t6,identityProviderConfigProvider:async(S)=>new eR.DefaultIdentityProviderConfig({"aws.auth#sigv4":S.credentials,"aws.auth#sigv4a":S.credentials})})),this.middlewareStack.use(eR.getHttpSigningPlugin(this.config)),this.middlewareStack.use(kW(this.config)),this.middlewareStack.use(cA(this.config)),this.middlewareStack.use(DW(this.config)),this.middlewareStack.use(R8(this.config)),this.middlewareStack.use($8(this.config))}destroy(){super.destroy()}}function nJ(f){return(R)=>async(h)=>{let $={...h.input},G=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(let A of G){let W=$[A.target];if(W){let F;if(typeof W==="string")if(eJ(W,f))F=f.base64Decoder(W);else F=f.utf8Decoder(W),$[A.target]=f.base64Encoder(F);else F=ArrayBuffer.isView(W)?new Uint8Array(W.buffer,W.byteOffset,W.byteLength):new Uint8Array(W),$[A.target]=f.base64Encoder(F);let N=new f.md5;N.update(F),$[A.hash]=f.base64Encoder(await N.digest())}}return R({...h,input:$})}}var uJ={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},kh=(f)=>({applyToStack:(R)=>{R.add(nJ(f),uJ)}});function eJ(f,R){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(f))return!1;try{return R.base64Decoder(f).length===32}catch{return!1}}var t4=M(rR(),1),fN=M(Ih(),1),RN=M(Jf(),1);class B3 extends RN.Command.classBuilder().ep({...ef,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(f,R,h,$){return[fN.getSerdePlugin(h,this.serialize,this.deserialize),t4.getEndpointPlugin(h,f.getEndpointParameterInstructions()),m1(h,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),kh(h),LW(h)]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").f(UF,NF).ser(PF).de(jF).build(){}var hN=M(rR(),1),$N=M(Ih(),1),GN=M(Jf(),1);class K3 extends GN.Command.classBuilder().ep({...ef,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(f,R,h,$){return[$N.getSerdePlugin(h,this.serialize,this.deserialize),hN.getEndpointPlugin(h,f.getEndpointParameterInstructions()),lR(h)]}).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").f(void 0,void 0).ser(BF).de(yF).build(){}var AN=M(rR(),1),WN=M(Ih(),1),FN=M(Jf(),1);class v3 extends FN.Command.classBuilder().ep({...ef,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(f,R,h,$){return[WN.getSerdePlugin(h,this.serialize,this.deserialize),AN.getEndpointPlugin(h,f.getEndpointParameterInstructions()),m1(h,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),MW(h),lR(h),kh(h)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").f(ZF,YF).ser(KF).de(OF).build(){}import{Buffer as NN}from"buffer";class UN extends CR{client;constructor(...f){super();this.client=new P3(...f)}async put(f){let R,h,$,G=process.env.BUCKET_NAME;if(f instanceof Blob)R=f,$=`${Bun.randomUUIDv7()}.${f.type.split("/")[1].split(";")[0]}`,h=f.type;else R=f.body,$=f.name,G=f.bucket??G,h=f.contentType;h=R instanceof Blob||R instanceof File?R.type:void 0;let A=R instanceof NN?R:R instanceof Blob||R instanceof File?NN.from(await R.arrayBuffer()):"";return await this.client.send(new v3({Bucket:G,Key:$,Body:A,ContentType:h})),$}async list(f){return await this.client.send(new K3({Bucket:process.env.BUCKET_NAME,Prefix:f}))}async fetch(f){let R=process.env.BUCKET_NAME,h;if(typeof f==="string")h=f;else R=f.bucket??R,h=f.name;if(!h)throw Error("Object name has to be specified");let $=await this.client.send(new B3({Bucket:R,Key:h}));return new Response($.Body.transformToWebStream(),{headers:{"Content-Type":$.ContentType,"Content-Length":$.ContentLength.toString(),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":$.LastModified?.toUTCString()||"",ETag:$.ETag||""}})}}class lh{}class sh extends lh{requests=new Map;consume(f,R){if(!this.requests.has(f))this.requests.set(f,{date:Date.now(),count:1});else{let h=this.requests.get(f),$=Date.now();if($-h.date>=60000)this.requests.set(f,{date:$,count:1});else this.requests.set(f,{date:h.date,count:h.count+1})}return this.requests.get(f).count}}class HN extends r{driver=new sh;boot(){}}import*as _9 from"react-dom/server";var V;(function(f){f.Root="root",f.Text="text",f.Directive="directive",f.Comment="comment",f.Script="script",f.Style="style",f.Tag="tag",f.CDATA="cdata",f.Doctype="doctype"})(V||(V={}));function YN(f){return f.type===V.Tag||f.type===V.Script||f.type===V.Style}var{Root:ZN,Text:JN,Directive:MN,Comment:XN,Script:SN,Style:DN,Tag:zN,CDATA:QN,Doctype:LN}=V;class y3{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(f){this.parent=f}get previousSibling(){return this.prev}set previousSibling(f){this.prev=f}get nextSibling(){return this.next}set nextSibling(f){this.next=f}cloneNode(f=!1){return wN(this,f)}}class _h extends y3{constructor(f){super();this.data=f}get nodeValue(){return this.data}set nodeValue(f){this.data=f}}class i0 extends _h{constructor(){super(...arguments);this.type=V.Text}get nodeType(){return 3}}class dh extends _h{constructor(){super(...arguments);this.type=V.Comment}get nodeType(){return 8}}class ah extends _h{constructor(f,R){super(R);this.name=f,this.type=V.Directive}get nodeType(){return 1}}class ih extends y3{constructor(f){super();this.children=f}get firstChild(){var f;return(f=this.children[0])!==null&&f!==void 0?f:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(f){this.children=f}}class rh extends ih{constructor(){super(...arguments);this.type=V.CDATA}get nodeType(){return 4}}class r0 extends ih{constructor(){super(...arguments);this.type=V.Root}get nodeType(){return 9}}class ph extends ih{constructor(f,R,h=[],$=f==="script"?V.Script:f==="style"?V.Style:V.Tag){super(h);this.name=f,this.attribs=R,this.type=$}get nodeType(){return 1}get tagName(){return this.name}set tagName(f){this.name=f}get attributes(){return Object.keys(this.attribs).map((f)=>{var R,h;return{name:f,value:this.attribs[f],namespace:(R=this["x-attribsNamespace"])===null||R===void 0?void 0:R[f],prefix:(h=this["x-attribsPrefix"])===null||h===void 0?void 0:h[f]}})}}function oh(f){return YN(f)}function tJ(f){return f.type===V.CDATA}function f5(f){return f.type===V.Text}function R5(f){return f.type===V.Comment}function h5(f){return f.type===V.Directive}function $5(f){return f.type===V.Root}function wN(f,R=!1){let h;if(f5(f))h=new i0(f.data);else if(R5(f))h=new dh(f.data);else if(oh(f)){let $=R?j3(f.children):[],G=new ph(f.name,{...f.attribs},$);if($.forEach((A)=>A.parent=G),f.namespace!=null)G.namespace=f.namespace;if(f["x-attribsNamespace"])G["x-attribsNamespace"]={...f["x-attribsNamespace"]};if(f["x-attribsPrefix"])G["x-attribsPrefix"]={...f["x-attribsPrefix"]};h=G}else if(tJ(f)){let $=R?j3(f.children):[],G=new rh($);$.forEach((A)=>A.parent=G),h=G}else if($5(f)){let $=R?j3(f.children):[],G=new r0($);if($.forEach((A)=>A.parent=G),f["x-mode"])G["x-mode"]=f["x-mode"];h=G}else if(h5(f)){let $=new ah(f.name,f.data);if(f["x-name"]!=null)$["x-name"]=f["x-name"],$["x-publicId"]=f["x-publicId"],$["x-systemId"]=f["x-systemId"];h=$}else throw Error(`Not implemented yet: ${f.type}`);if(h.startIndex=f.startIndex,h.endIndex=f.endIndex,f.sourceCodeLocation!=null)h.sourceCodeLocation=f.sourceCodeLocation;return h}function j3(f){let R=f.map((h)=>wN(h,!0));for(let h=1;h<R.length;h++)R[h].prev=R[h-1],R[h-1].next=R[h];return R}var qN={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class O3{constructor(f,R,h){if(this.dom=[],this.root=new r0(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof R==="function")h=R,R=qN;if(typeof f==="object")R=f,f=void 0;this.callback=f!==null&&f!==void 0?f:null,this.options=R!==null&&R!==void 0?R:qN,this.elementCB=h!==null&&h!==void 0?h:null}onparserinit(f){this.parser=f}onreset(){this.dom=[],this.root=new r0(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){if(this.done)return;this.done=!0,this.parser=null,this.handleCallback(null)}onerror(f){this.handleCallback(f)}onclosetag(){this.lastNode=null;let f=this.tagStack.pop();if(this.options.withEndIndices)f.endIndex=this.parser.endIndex;if(this.elementCB)this.elementCB(f)}onopentag(f,R){let h=this.options.xmlMode?V.Tag:void 0,$=new ph(f,R,void 0,h);this.addNode($),this.tagStack.push($)}ontext(f){let{lastNode:R}=this;if(R&&R.type===V.Text){if(R.data+=f,this.options.withEndIndices)R.endIndex=this.parser.endIndex}else{let h=new i0(f);this.addNode(h),this.lastNode=h}}oncomment(f){if(this.lastNode&&this.lastNode.type===V.Comment){this.lastNode.data+=f;return}let R=new dh(f);this.addNode(R),this.lastNode=R}oncommentend(){this.lastNode=null}oncdatastart(){let f=new i0(""),R=new rh([f]);this.addNode(R),f.parent=R,this.lastNode=f}oncdataend(){this.lastNode=null}onprocessinginstruction(f,R){let h=new ah(f,R);this.addNode(h)}handleCallback(f){if(typeof this.callback==="function")this.callback(f,this.dom);else if(f)throw f}addNode(f){let R=this.tagStack[this.tagStack.length-1],h=R.children[R.children.length-1];if(this.options.withStartIndices)f.startIndex=this.parser.startIndex;if(this.options.withEndIndices)f.endIndex=this.parser.endIndex;if(R.children.push(f),h)f.prev=h,h.next=f;f.parent=R,this.lastNode=null}}var G5=/\n/g;function A5(f){let R=[...f.matchAll(G5)].map(($)=>$.index||0);R.unshift(-1);let h=V3(R,0,R.length);return($)=>BN(h,$)}function V3(f,R,h){if(h-R==1)return{offset:f[R],index:R+1};let $=Math.ceil((R+h)/2),G=V3(f,R,$),A=V3(f,$,h);return{offset:G.offset,low:G,high:A}}function BN(f,R){return function(h){return Object.prototype.hasOwnProperty.call(h,"index")}(f)?{line:f.index,column:R-f.offset}:BN(f.high.offset<R?f.high:f.low,R)}function E3(f,R="",h={}){let $=typeof R!="string"?R:h,G=typeof R=="string"?R:"",A=f.map(W5),W=!!$.lineNumbers;return function(F,N=0){let U=W?A5(F):()=>({line:0,column:0}),J=N,X=[];f:for(;J<F.length;){let z=!1;for(let S of A){S.regex.lastIndex=J;let B=S.regex.exec(F);if(B&&B[0].length>0){if(!S.discard){let C=U(J),i=typeof S.replace=="string"?B[0].replace(new RegExp(S.regex.source,S.regex.flags),S.replace):B[0];X.push({state:G,name:S.name,text:i,offset:J,len:B[0].length,line:C.line,column:C.column})}if(J=S.regex.lastIndex,z=!0,S.push){let C=S.push(F,J);X.push(...C.tokens),J=C.offset}if(S.pop)break f;break}}if(!z)break}return{tokens:X,offset:J,complete:F.length<=J}}}function W5(f,R){return{...f,regex:F5(f,R)}}function F5(f,R){if(f.name.length===0)throw Error(`Rule #${R} has empty name, which is not allowed.`);if(function(h){return Object.prototype.hasOwnProperty.call(h,"regex")}(f))return function(h){if(h.global)throw Error(`Regular expression /${h.source}/${h.flags} contains the global flag, which is not allowed.`);return h.sticky?h:new RegExp(h.source,h.flags+"y")}(f.regex);if(function(h){return Object.prototype.hasOwnProperty.call(h,"str")}(f)){if(f.str.length===0)throw Error(`Rule #${R} ("${f.name}") has empty "str" property, which is not allowed.`);return new RegExp(PN(f.str),"y")}return new RegExp(PN(f.name),"y")}function PN(f){return f.replace(/[-[\]{}()*+!<=:?./\\^$|#\s,]/g,"\\$&")}function kf(f,R){return(h,$)=>{let G=$,A=void 0;if($<h.tokens.length){if(A=f(h.tokens[$],h,$),A!==void 0)G++}else R?.(h,$);return A===void 0?{matched:!1}:{matched:!0,position:G,value:A}}}function T3(f,R){return f.matched?{matched:!0,position:f.position,value:R(f.value,f.position)}:f}function nh(f,R){return f.matched?R(f):f}function Uf(f,R){return(h,$)=>T3(f(h,$),(G,A)=>R(G,h,$,A))}function p0(f,R){return(h,$)=>{let G=f(h,$);return G.matched?G:{matched:!0,position:$,value:R}}}function tR(...f){return(R,h)=>{for(let $ of f){let G=$(R,h);if(G.matched)return G}return{matched:!1}}}function AR(f,R){return(h,$)=>{let G=f(h,$);return G.matched?G:R(h,$)}}function N5(f,R){return(h,$)=>{let G=[],A=!0;do{let W=f(h,$);if(W.matched&&R(W.value,G.length+1,h,$,W.position))G.push(W.value),$=W.position;else A=!1}while(A);return{matched:!0,position:$,value:G}}}function uh(f){return N5(f,()=>!0)}function KN(f){return Zf(f,uh(f),(R,h)=>[R,...h])}function Zf(f,R,h){return($,G)=>nh(f($,G),(A)=>T3(R($,A.position),(W,F)=>h(A.value,W,$,G,F)))}function vN(f,R){return Zf(f,R,(h)=>h)}function g3(f,R){return Zf(f,R,(h,$)=>$)}function eh(f,R,h,$){return(G,A)=>nh(f(G,A),(W)=>nh(R(G,W.position),(F)=>T3(h(G,F.position),(N,U)=>$(W.value,F.value,N,G,A,U))))}function C3(f,R,h){return eh(f,R,h,($,G)=>G)}function U5(...f){return(R,h)=>{let $=[],G=h;for(let A of f){let W=A(R,G);if(W.matched)$.push(W.value),G=W.position;else return{matched:!1}}return{matched:!0,position:G,value:$}}}function jN(...f){return H5(U5(...f))}function H5(f){return Uf(f,(R)=>R.flatMap((h)=>h))}function Y5(f,R){return(h,$)=>{let G=!0,A=f,W=$;do{let F=R(A,h,W)(h,W);if(F.matched)A=F.value,W=F.position;else G=!1}while(G);return{matched:!0,position:W,value:A}}}function Z5(f,R,h){return Y5(f,($)=>Uf(R,(G,A,W,F)=>h($,G,A,W,F)))}function m3(f,R,h){return J5(f,($)=>Z5($,Zf(R,h,(G,A)=>[G,A]),(G,[A,W])=>A(G,W)))}function J5(f,R){return(h,$)=>nh(f(h,$),(G)=>R(G.value,h,$,G.position)(h,G.position))}var X5="(?:[ \\t\\r\\n\\f]*)",gN="(?:\\n|\\r\\n|\\r|\\f)",R$="[^\\x00-\\x7F]",u0="(?:\\\\[0-9a-f]{1,6}(?:\\r\\n|[ \\n\\r\\t\\f])?)",e0="(?:\\\\[^\\n\\r\\f0-9a-f])",S5=`(?:[_a-z]|${R$}|${u0}|${e0})`,CN=`(?:[_a-z0-9-]|${R$}|${u0}|${e0})`,D5=`(?:${CN}+)`,z5=`(?:[-]?${S5}${CN}*)`,Q5=`'([^\\n\\r\\f\\\\']|\\\\${gN}|${R$}|${u0}|${e0})*'`,L5=`"([^\\n\\r\\f\\\\"]|\\\\${gN}|${R$}|${u0}|${e0})*"`,I5=E3([{name:"ws",regex:new RegExp(X5)},{name:"hash",regex:new RegExp(`#${D5}`,"i")},{name:"ident",regex:new RegExp(z5,"i")},{name:"str1",regex:new RegExp(Q5,"i")},{name:"str2",regex:new RegExp(L5,"i")},{name:"*"},{name:"."},{name:","},{name:"["},{name:"]"},{name:"="},{name:">"},{name:"|"},{name:"+"},{name:"~"},{name:"^"},{name:"$"}]),w5=E3([{name:"unicode",regex:new RegExp(u0,"i")},{name:"escape",regex:new RegExp(e0,"i")},{name:"any",regex:new RegExp("[\\s\\S]","i")}]);function mN([f,R,h],[$,G,A]){return[f+$,R+G,h+A]}function q5(f){return f.reduce(mN,[0,0,0])}var P5=kf((f)=>f.name==="unicode"?String.fromCodePoint(parseInt(f.text.slice(1),16)):void 0),B5=kf((f)=>f.name==="escape"?f.text.slice(1):void 0),K5=kf((f)=>f.name==="any"?f.text:void 0),v5=Uf(uh(tR(P5,B5,K5)),(f)=>f.join(""));function x3(f){let R=w5(f);return v5({tokens:R.tokens,options:void 0},0).value}function l(f){return kf((R)=>R.name===f?!0:void 0)}var k3=kf((f)=>f.name==="ws"?null:void 0),c3=p0(k3,null);function R0(f){return C3(c3,f,c3)}var n0=kf((f)=>f.name==="ident"?x3(f.text):void 0),j5=kf((f)=>f.name==="hash"?x3(f.text.slice(1)):void 0),y5=kf((f)=>f.name.startsWith("str")?x3(f.text.slice(1,-1)):void 0),cN=vN(p0(n0,""),l("|")),l3=AR(Zf(cN,n0,(f,R)=>({name:R,namespace:f})),Uf(n0,(f)=>({name:f,namespace:null}))),O5=AR(Zf(cN,l("*"),(f)=>({type:"universal",namespace:f,specificity:[0,0,0]})),Uf(l("*"),()=>({type:"universal",namespace:null,specificity:[0,0,0]}))),V5=Uf(l3,({name:f,namespace:R})=>({type:"tag",name:f,namespace:R,specificity:[0,0,1]})),E5=Zf(l("."),n0,(f,R)=>({type:"class",name:R,specificity:[0,1,0]})),T5=Uf(j5,(f)=>({type:"id",name:f,specificity:[1,0,0]})),yN=kf((f)=>{if(f.name==="ident"){if(f.text==="i"||f.text==="I")return"i";if(f.text==="s"||f.text==="S")return"s"}return}),g5=AR(Zf(y5,p0(g3(c3,yN),null),(f,R)=>({value:f,modifier:R})),Zf(n0,p0(g3(k3,yN),null),(f,R)=>({value:f,modifier:R}))),C5=tR(Uf(l("="),()=>"="),Zf(l("~"),l("="),()=>"~="),Zf(l("|"),l("="),()=>"|="),Zf(l("^"),l("="),()=>"^="),Zf(l("$"),l("="),()=>"$="),Zf(l("*"),l("="),()=>"*=")),m5=eh(l("["),R0(l3),l("]"),(f,{name:R,namespace:h})=>({type:"attrPresence",name:R,namespace:h,specificity:[0,1,0]})),c5=C3(l("["),eh(R0(l3),C5,R0(g5),({name:f,namespace:R},h,{value:$,modifier:G})=>({type:"attrValue",name:f,namespace:R,matcher:h,value:$,modifier:G,specificity:[0,1,0]})),l("]")),b5=AR(m5,c5),x5=AR(O5,V5),ON=tR(T5,E5,b5),VN=Uf(AR(jN(x5,uh(ON)),KN(ON)),(f)=>{return{type:"compound",list:f,specificity:q5(f.map((R)=>R.specificity))}}),k5=tR(Uf(l(">"),()=>">"),Uf(l("+"),()=>"+"),Uf(l("~"),()=>"~"),Zf(l("|"),l("|"),()=>"||")),l5=AR(R0(k5),Uf(k3,()=>" ")),b3=m3(VN,Uf(l5,(f)=>(R,h)=>({type:"compound",list:[...h.list,{type:"combinator",combinator:f,left:R,specificity:R.specificity}],specificity:mN(R.specificity,h.specificity)})),VN),gP=m3(Uf(b3,(f)=>({type:"list",list:[f]})),Uf(R0(l(",")),()=>(f,R)=>({type:"list",list:[...f.list,R]})),b3);function s5(f,R){if(!(typeof R==="string"||R instanceof String))throw Error("Expected a selector string. Actual input is not a string!");let h=I5(R);if(!h.complete)throw Error(`The input "${R}" was only partially tokenized, stopped at offset ${h.offset}!
53
+ `),Z4=!0}throw new RR.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:f.logger,tryNextLink:!0})}return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),X4(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:R,ssoAccountId:h,ssoRegion:$,ssoRoleName:G,ssoSession:A}=f;if(!R&&!h&&!$&&!G&&!A)throw new RR.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:f.logger});let{fromSSO:W}=await import("../chunk-71v0pn3m.js");return W(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:R}=await import("../chunk-8saa1z5r.js");return R(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:R}=await import("../chunk-gaj22pt9.js");return R(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:R}=await import("../chunk-9299rve0.js");return R(f)()},async()=>{return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Y4(f))()},async()=>{throw new RR.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:f.logger})}),HJ,UJ),UJ=(f)=>f?.expiration!==void 0,HJ=(f)=>f?.expiration!==void 0&&f.expiration.getTime()-Date.now()<300000;var z4=M(t$(),1);var nR=M(t$(),1),YJ="AWS_S3_USE_ARN_REGION",ZJ="s3_use_arn_region",Q4={environmentVariableSelector:(f)=>nR.booleanSelector(f,YJ,nR.SelectorType.ENV),configFileSelector:(f)=>nR.booleanSelector(f,ZJ,nR.SelectorType.CONFIG),default:!1};var wJ=M(Vf(),1);var Vh=M(kJ(),1),GR=M(m4(),1);var hR=M(I4(),1);var w4=M(I4(),1);class uR{constructor(f){if(this.bytes=f,f.byteLength!==8)throw Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(f){if(f>9223372036854776000||f<-9223372036854776000)throw Error(`${f} is too large (or, if negative, too small) to represent as an Int64`);let R=new Uint8Array(8);for(let h=7,$=Math.abs(Math.round(f));h>-1&&$>0;h--,$/=256)R[h]=$;if(f<0)L4(R);return new uR(R)}valueOf(){let f=this.bytes.slice(0),R=f[0]&128;if(R)L4(f);return parseInt(w4.toHex(f),16)*(R?-1:1)}toString(){return String(this.valueOf())}}function L4(f){for(let R=0;R<8;R++)f[R]^=255;for(let R=7;R>-1;R--)if(f[R]++,f[R]!==0)break}class D3{constructor(f,R){this.toUtf8=f,this.fromUtf8=R}format(f){let R=[];for(let G of Object.keys(f)){let A=this.fromUtf8(G);R.push(Uint8Array.from([A.byteLength]),A,this.formatHeaderValue(f[G]))}let h=new Uint8Array(R.reduce((G,A)=>G+A.byteLength,0)),$=0;for(let G of R)h.set(G,$),$+=G.byteLength;return h}formatHeaderValue(f){switch(f.type){case"boolean":return Uint8Array.from([f.value?0:1]);case"byte":return Uint8Array.from([2,f.value]);case"short":let R=new DataView(new ArrayBuffer(3));return R.setUint8(0,3),R.setInt16(1,f.value,!1),new Uint8Array(R.buffer);case"integer":let h=new DataView(new ArrayBuffer(5));return h.setUint8(0,4),h.setInt32(1,f.value,!1),new Uint8Array(h.buffer);case"long":let $=new Uint8Array(9);return $[0]=5,$.set(f.value.bytes,1),$;case"binary":let G=new DataView(new ArrayBuffer(3+f.value.byteLength));G.setUint8(0,6),G.setUint16(1,f.value.byteLength,!1);let A=new Uint8Array(G.buffer);return A.set(f.value,3),A;case"string":let W=this.fromUtf8(f.value),F=new DataView(new ArrayBuffer(3+W.byteLength));F.setUint8(0,7),F.setUint16(1,W.byteLength,!1);let N=new Uint8Array(F.buffer);return N.set(W,3),N;case"timestamp":let U=new Uint8Array(9);return U[0]=8,U.set(uR.fromNumber(f.value.valueOf()).bytes,1),U;case"uuid":if(!VJ.test(f.value))throw Error(`Invalid UUID received: ${f.value}`);let J=new Uint8Array(17);return J[0]=9,J.set(hR.fromHex(f.value.replace(/\-/g,"")),1),J}}parse(f){let R={},h=0;while(h<f.byteLength){let $=f.getUint8(h++),G=this.toUtf8(new Uint8Array(f.buffer,f.byteOffset+h,$));switch(h+=$,f.getUint8(h++)){case 0:R[G]={type:P4,value:!0};break;case 1:R[G]={type:P4,value:!1};break;case 2:R[G]={type:qJ,value:f.getInt8(h++)};break;case 3:R[G]={type:PJ,value:f.getInt16(h,!1)},h+=2;break;case 4:R[G]={type:BJ,value:f.getInt32(h,!1)},h+=4;break;case 5:R[G]={type:KJ,value:new uR(new Uint8Array(f.buffer,f.byteOffset+h,8))},h+=8;break;case 6:let A=f.getUint16(h,!1);h+=2,R[G]={type:vJ,value:new Uint8Array(f.buffer,f.byteOffset+h,A)},h+=A;break;case 7:let W=f.getUint16(h,!1);h+=2,R[G]={type:jJ,value:this.toUtf8(new Uint8Array(f.buffer,f.byteOffset+h,W))},h+=W;break;case 8:R[G]={type:yJ,value:new Date(new uR(new Uint8Array(f.buffer,f.byteOffset+h,8)).valueOf())},h+=8;break;case 9:let F=new Uint8Array(f.buffer,f.byteOffset+h,16);h+=16,R[G]={type:OJ,value:`${hR.toHex(F.subarray(0,4))}-${hR.toHex(F.subarray(4,6))}-${hR.toHex(F.subarray(6,8))}-${hR.toHex(F.subarray(8,10))}-${hR.toHex(F.subarray(10))}`};break;default:throw Error("Unrecognized header type tag")}}return R}}var q4;(function(f){f[f.boolTrue=0]="boolTrue",f[f.boolFalse=1]="boolFalse",f[f.byte=2]="byte",f[f.short=3]="short",f[f.integer=4]="integer",f[f.long=5]="long",f[f.byteArray=6]="byteArray",f[f.string=7]="string",f[f.timestamp=8]="timestamp",f[f.uuid=9]="uuid"})(q4||(q4={}));var P4="boolean",qJ="byte",PJ="short",BJ="integer",KJ="long",vJ="binary",jJ="string",yJ="timestamp",OJ="uuid",VJ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var B4=4,$R=B4*2,KR=4,EJ=$R+KR*2;function K4({byteLength:f,byteOffset:R,buffer:h}){if(f<EJ)throw Error("Provided message too short to accommodate event stream message overhead");let $=new DataView(h,R,f),G=$.getUint32(0,!1);if(f!==G)throw Error("Reported message length does not match received message length");let A=$.getUint32(B4,!1),W=$.getUint32($R,!1),F=$.getUint32(f-KR,!1),N=new QR().update(new Uint8Array(h,R,$R));if(W!==N.digest())throw Error(`The prelude checksum specified in the message (${W}) does not match the calculated CRC32 checksum (${N.digest()})`);if(N.update(new Uint8Array(h,R+$R,f-($R+KR))),F!==N.digest())throw Error(`The message checksum (${N.digest()}) did not match the expected value of ${F}`);return{headers:new DataView(h,R+$R+KR,A),body:new Uint8Array(h,R+$R+KR+A,G-A-($R+KR+KR))}}class z3{constructor(f,R){this.headerMarshaller=new D3(f,R),this.messageBuffer=[],this.isEndOfStream=!1}feed(f){this.messageBuffer.push(this.decode(f))}endOfStream(){this.isEndOfStream=!0}getMessage(){let f=this.messageBuffer.pop(),R=this.isEndOfStream;return{getMessage(){return f},isEndOfStream(){return R}}}getAvailableMessages(){let f=this.messageBuffer;this.messageBuffer=[];let R=this.isEndOfStream;return{getMessages(){return f},isEndOfStream(){return R}}}encode({headers:f,body:R}){let h=this.headerMarshaller.format(f),$=h.byteLength+R.byteLength+16,G=new Uint8Array($),A=new DataView(G.buffer,G.byteOffset,G.byteLength),W=new QR;return A.setUint32(0,$,!1),A.setUint32(4,h.byteLength,!1),A.setUint32(8,W.update(G.subarray(0,8)).digest(),!1),G.set(h,12),G.set(R,h.byteLength+12),A.setUint32($-4,W.update(G.subarray(8,$-4)).digest(),!1),G}decode(f){let{headers:R,body:h}=K4(f);return{headers:this.headerMarshaller.parse(R),body:h}}formatHeaders(f){return this.headerMarshaller.format(f)}}class Q3{constructor(f){this.options=f}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let f of this.options.inputStream)yield this.options.decoder.decode(f)}}class L3{constructor(f){this.options=f}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let f of this.options.messageStream)yield this.options.encoder.encode(f);if(this.options.includeEndFrame)yield new Uint8Array(0)}}class I3{constructor(f){this.options=f}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let f of this.options.messageStream){let R=await this.options.deserializer(f);if(R===void 0)continue;yield R}}}class w3{constructor(f){this.options=f}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let f of this.options.inputStream)yield this.options.serializer(f)}}function v4(f){let R=0,h=0,$=null,G=null,A=(F)=>{if(typeof F!=="number")throw Error("Attempted to allocate an event message where size was not a number: "+F);R=F,h=4,$=new Uint8Array(F),new DataView($.buffer).setUint32(0,F,!1)},W=async function*(){let F=f[Symbol.asyncIterator]();while(!0){let{value:N,done:U}=await F.next();if(U){if(!R)return;else if(R===h)yield $;else throw Error("Truncated event message received.");return}let J=N.length,X=0;while(X<J){if(!$){let S=J-X;if(!G)G=new Uint8Array(4);let B=Math.min(4-h,S);if(G.set(N.slice(X,X+B),h),h+=B,X+=B,h<4)break;A(new DataView(G.buffer).getUint32(0,!1)),G=null}let z=Math.min(R-h,J-X);if($.set(N.slice(X,X+z),h),h+=z,X+=z,R&&R===h)yield $,$=null,R=0,h=0}}};return{[Symbol.asyncIterator]:W}}function j4(f,R){return async function(h){let{value:$}=h.headers[":message-type"];if($==="error"){let G=Error(h.headers[":error-message"].value||"UnknownError");throw G.name=h.headers[":error-code"].value,G}else if($==="exception"){let G=h.headers[":exception-type"].value,A={[G]:h},W=await f(A);if(W.$unknown){let F=Error(R(h.body));throw F.name=G,F}throw W[G]}else if($==="event"){let G={[h.headers[":event-type"].value]:h},A=await f(G);if(A.$unknown)return;return A}else throw Error(`Unrecognizable event type: ${h.headers[":event-type"].value}`)}}class qh{constructor({utf8Encoder:f,utf8Decoder:R}){this.eventStreamCodec=new z3(f,R),this.utfEncoder=f}deserialize(f,R){let h=v4(f);return new I3({messageStream:new Q3({inputStream:h,decoder:this.eventStreamCodec}),deserializer:j4(R,this.utfEncoder)})}serialize(f,R){return new L3({messageStream:new w3({inputStream:f,serializer:R}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}import{Readable as TJ}from"stream";async function*y4(f){let R=!1,h=!1,$=[];f.on("error",(G)=>{if(!R)R=!0;if(G)throw G}),f.on("data",(G)=>{$.push(G)}),f.on("end",()=>{R=!0});while(!h){let G=await new Promise((A)=>setTimeout(()=>A($.shift()),0));if(G)yield G;h=R&&$.length===0}}class q3{constructor({utf8Encoder:f,utf8Decoder:R}){this.universalMarshaller=new qh({utf8Decoder:R,utf8Encoder:f})}deserialize(f,R){let h=typeof f[Symbol.asyncIterator]==="function"?f:y4(f);return this.universalMarshaller.deserialize(h,R)}serialize(f,R){return TJ.from(this.universalMarshaller.serialize(f,R))}}var O4=(f)=>new q3(f);var yh=M(lJ(),1);var V4=M(n$(),1);import{Writable as gJ}from"stream";class Ph extends gJ{constructor(f,R){super(R);this.hash=f}_write(f,R,h){try{this.hash.update(V4.toUint8Array(f))}catch($){return h($)}h()}}var E4=(f,R)=>{if(R.readableFlowing!==null)throw Error("Unable to calculate hash for flowing readable stream");let h=new f,$=new Ph(h);return R.pipe($),new Promise((G,A)=>{R.on("error",(W)=>{$.end(),A(W)}),$.on("error",A),$.on("finish",()=>{h.digest().then(G).catch(A)})})};var Eh=M(c4(),1),Pf=M(bJ(),1),Th=M(cJ(),1),b4=M(sJ(),1),x4=M(xJ(),1);var Bh=M(LR(),1);var T4=M(Jf(),1),g4=M(mJ(),1),Kh=M(CJ(),1),vh=M(g1(),1),jh=M(n$(),1);var C4=(f)=>{return{apiVersion:"2006-03-01",base64Decoder:f?.base64Decoder??Kh.fromBase64,base64Encoder:f?.base64Encoder??Kh.toBase64,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??d1,extensions:f?.extensions??[],getAwsChunkedEncodingStream:f?.getAwsChunkedEncodingStream??vh.getAwsChunkedEncodingStream,httpAuthSchemeProvider:f?.httpAuthSchemeProvider??hF,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(R)=>R.getIdentityProvider("aws.auth#sigv4"),signer:new Bh.AwsSdkSigV4Signer},{schemeId:"aws.auth#sigv4a",identityProvider:(R)=>R.getIdentityProvider("aws.auth#sigv4a"),signer:new Bh.AwsSdkSigV4ASigner}],logger:f?.logger??new T4.NoOpLogger,sdkStreamMixin:f?.sdkStreamMixin??vh.sdkStreamMixin,serviceId:f?.serviceId??"S3",signerConstructor:f?.signerConstructor??A8,signingEscapePath:f?.signingEscapePath??!1,urlParser:f?.urlParser??g4.parseUrl,useArnRegion:f?.useArnRegion??!1,utf8Decoder:f?.utf8Decoder??jh.fromUtf8,utf8Encoder:f?.utf8Encoder??jh.toUtf8}};var k4=M(Jf(),1),l4=M(_J(),1),s4=M(Jf(),1),_4=(f)=>{s4.emitWarningIfUnsupportedVersion(process.version);let R=l4.resolveDefaultsModeConfig(f),h=()=>R().then(k4.loadConfigsForDefaultMode),$=C4(f);Oh.emitWarningIfUnsupportedVersion(process.version);let G={profile:f?.profile};return{...$,...f,runtime:"node",defaultsMode:R,bodyLengthChecker:f?.bodyLengthChecker??b4.calculateBodyLength,credentialDefaultProvider:f?.credentialDefaultProvider??D4,defaultUserAgentProvider:f?.defaultUserAgentProvider??Vh.createDefaultUserAgentProvider({serviceId:$.serviceId,clientVersion:N4.version}),disableS3ExpressSessionAuth:f?.disableS3ExpressSessionAuth??Pf.loadConfig(f8,G),eventStreamSerdeProvider:f?.eventStreamSerdeProvider??O4,maxAttempts:f?.maxAttempts??Pf.loadConfig(Eh.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,f),md5:f?.md5??yh.Hash.bind(null,"md5"),region:f?.region??Pf.loadConfig(GR.NODE_REGION_CONFIG_OPTIONS,{...GR.NODE_REGION_CONFIG_FILE_OPTIONS,...G}),requestChecksumCalculation:f?.requestChecksumCalculation??Pf.loadConfig(xA,G),requestHandler:Th.NodeHttpHandler.create(f?.requestHandler??h),responseChecksumValidation:f?.responseChecksumValidation??Pf.loadConfig(kA,G),retryMode:f?.retryMode??Pf.loadConfig({...Eh.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await h()).retryMode||x4.DEFAULT_RETRY_MODE},f),sha1:f?.sha1??yh.Hash.bind(null,"sha1"),sha256:f?.sha256??yh.Hash.bind(null,"sha256"),sigv4aSigningRegionSet:f?.sigv4aSigningRegionSet??Pf.loadConfig(Oh.NODE_SIGV4A_CONFIG_OPTIONS,G),streamCollector:f?.streamCollector??Th.streamCollector,streamHasher:f?.streamHasher??E4,useArnRegion:f?.useArnRegion??Pf.loadConfig(Q4,G),useDualstackEndpoint:f?.useDualstackEndpoint??Pf.loadConfig(GR.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,G),useFipsEndpoint:f?.useFipsEndpoint??Pf.loadConfig(GR.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,G),userAgentAppId:f?.userAgentAppId??Pf.loadConfig(Vh.NODE_APP_ID_CONFIG_OPTIONS,G)}};var gh=M(dJ(),1),Ch=M(Vf(),1),mh=M(Jf(),1);var d4=(f)=>{let{httpAuthSchemes:R,httpAuthSchemeProvider:h,credentials:$}=f;return{setHttpAuthScheme(G){let A=R.findIndex((W)=>W.schemeId===G.schemeId);if(A===-1)R.push(G);else R.splice(A,1,G)},httpAuthSchemes(){return R},setHttpAuthSchemeProvider(G){h=G},httpAuthSchemeProvider(){return h},setCredentials(G){$=G},credentials(){return $}}},a4=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var i4=(f,R)=>{let h=Object.assign(gh.getAwsRegionExtensionConfiguration(f),mh.getDefaultExtensionConfiguration(f),Ch.getHttpHandlerExtensionConfiguration(f),d4(f));return R.forEach(($)=>$.configure(h)),Object.assign(f,gh.resolveAwsRegionExtensionConfiguration(h),mh.resolveDefaultRuntimeConfig(h),Ch.resolveHttpHandlerRuntimeConfig(h),a4(h))};class P3 extends e4.Client{config;constructor(...[f]){let R=_4(f||{});super(R);this.initConfig=R;let h=GF(R),$=bh.resolveUserAgentConfig(h),G=YW($),A=xh.resolveRetryConfig(G),W=o4.resolveRegionConfig(A),F=ch.resolveHostHeaderConfig(W),N=u4.resolveEndpointConfig(F),U=lW(N),J=$F(U),X=mW(J,{session:[()=>this,S3]}),z=i4(X,f?.extensions||[]);this.config=z,this.middlewareStack.use(bh.getUserAgentPlugin(this.config)),this.middlewareStack.use(xh.getRetryPlugin(this.config)),this.middlewareStack.use(n4.getContentLengthPlugin(this.config)),this.middlewareStack.use(ch.getHostHeaderPlugin(this.config)),this.middlewareStack.use(r4.getLoggerPlugin(this.config)),this.middlewareStack.use(p4.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(eR.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:t6,identityProviderConfigProvider:async(S)=>new eR.DefaultIdentityProviderConfig({"aws.auth#sigv4":S.credentials,"aws.auth#sigv4a":S.credentials})})),this.middlewareStack.use(eR.getHttpSigningPlugin(this.config)),this.middlewareStack.use(kW(this.config)),this.middlewareStack.use(cA(this.config)),this.middlewareStack.use(DW(this.config)),this.middlewareStack.use(R8(this.config)),this.middlewareStack.use($8(this.config))}destroy(){super.destroy()}}function nJ(f){return(R)=>async(h)=>{let $={...h.input},G=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(let A of G){let W=$[A.target];if(W){let F;if(typeof W==="string")if(eJ(W,f))F=f.base64Decoder(W);else F=f.utf8Decoder(W),$[A.target]=f.base64Encoder(F);else F=ArrayBuffer.isView(W)?new Uint8Array(W.buffer,W.byteOffset,W.byteLength):new Uint8Array(W),$[A.target]=f.base64Encoder(F);let N=new f.md5;N.update(F),$[A.hash]=f.base64Encoder(await N.digest())}}return R({...h,input:$})}}var uJ={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},kh=(f)=>({applyToStack:(R)=>{R.add(nJ(f),uJ)}});function eJ(f,R){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(f))return!1;try{return R.base64Decoder(f).length===32}catch{return!1}}var t4=M(rR(),1),fN=M(Ih(),1),RN=M(Jf(),1);class B3 extends RN.Command.classBuilder().ep({...ef,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(f,R,h,$){return[fN.getSerdePlugin(h,this.serialize,this.deserialize),t4.getEndpointPlugin(h,f.getEndpointParameterInstructions()),m1(h,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),kh(h),LW(h)]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").f(UF,NF).ser(PF).de(jF).build(){}var hN=M(rR(),1),$N=M(Ih(),1),GN=M(Jf(),1);class K3 extends GN.Command.classBuilder().ep({...ef,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(f,R,h,$){return[$N.getSerdePlugin(h,this.serialize,this.deserialize),hN.getEndpointPlugin(h,f.getEndpointParameterInstructions()),lR(h)]}).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").f(void 0,void 0).ser(BF).de(yF).build(){}var AN=M(rR(),1),WN=M(Ih(),1),FN=M(Jf(),1);class v3 extends FN.Command.classBuilder().ep({...ef,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(f,R,h,$){return[WN.getSerdePlugin(h,this.serialize,this.deserialize),AN.getEndpointPlugin(h,f.getEndpointParameterInstructions()),m1(h,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),MW(h),lR(h),kh(h)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").f(ZF,YF).ser(KF).de(OF).build(){}import{Buffer as NN}from"buffer";class UN extends CR{client;constructor(...f){super();this.client=new P3(...f)}async put(f){let R,h,$,G=process.env.BUCKET_NAME;if(f instanceof Blob)R=f,$=`${Bun.randomUUIDv7()}.${f.type.split("/")[1].split(";")[0]}`,h=f.type;else R=f.body,$=f.name,G=f.bucket??G,h=f.contentType;h=R instanceof Blob||R instanceof File?R.type:void 0;let A=R instanceof NN?R:R instanceof Blob||R instanceof File?NN.from(await R.arrayBuffer()):"";return await this.client.send(new v3({Bucket:G,Key:$,Body:A,ContentType:h})),$}async list(f){return await this.client.send(new K3({Bucket:process.env.BUCKET_NAME,Prefix:f}))}async fetch(f){let R=process.env.BUCKET_NAME,h;if(typeof f==="string")h=f;else R=f.bucket??R,h=f.name;if(!h)throw Error("Object name has to be specified");let $=await this.client.send(new B3({Bucket:R,Key:h}));return new Response($.Body.transformToWebStream(),{headers:{"Content-Type":$.ContentType,"Content-Length":$.ContentLength.toString(),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":$.LastModified?.toUTCString()||"",ETag:$.ETag||""}})}}class lh{}class sh extends lh{requests=new Map;consume(f,R){if(!this.requests.has(f))this.requests.set(f,{date:Date.now(),count:1});else{let h=this.requests.get(f),$=Date.now();if($-h.date>=60000)this.requests.set(f,{date:$,count:1});else this.requests.set(f,{date:h.date,count:h.count+1})}return this.requests.get(f).count}}class HN extends r{driver=new sh;boot(){}}import*as _9 from"react-dom/server";var V;(function(f){f.Root="root",f.Text="text",f.Directive="directive",f.Comment="comment",f.Script="script",f.Style="style",f.Tag="tag",f.CDATA="cdata",f.Doctype="doctype"})(V||(V={}));function YN(f){return f.type===V.Tag||f.type===V.Script||f.type===V.Style}var{Root:ZN,Text:JN,Directive:MN,Comment:XN,Script:SN,Style:DN,Tag:zN,CDATA:QN,Doctype:LN}=V;class y3{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(f){this.parent=f}get previousSibling(){return this.prev}set previousSibling(f){this.prev=f}get nextSibling(){return this.next}set nextSibling(f){this.next=f}cloneNode(f=!1){return wN(this,f)}}class _h extends y3{constructor(f){super();this.data=f}get nodeValue(){return this.data}set nodeValue(f){this.data=f}}class i0 extends _h{constructor(){super(...arguments);this.type=V.Text}get nodeType(){return 3}}class dh extends _h{constructor(){super(...arguments);this.type=V.Comment}get nodeType(){return 8}}class ah extends _h{constructor(f,R){super(R);this.name=f,this.type=V.Directive}get nodeType(){return 1}}class ih extends y3{constructor(f){super();this.children=f}get firstChild(){var f;return(f=this.children[0])!==null&&f!==void 0?f:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(f){this.children=f}}class rh extends ih{constructor(){super(...arguments);this.type=V.CDATA}get nodeType(){return 4}}class r0 extends ih{constructor(){super(...arguments);this.type=V.Root}get nodeType(){return 9}}class ph extends ih{constructor(f,R,h=[],$=f==="script"?V.Script:f==="style"?V.Style:V.Tag){super(h);this.name=f,this.attribs=R,this.type=$}get nodeType(){return 1}get tagName(){return this.name}set tagName(f){this.name=f}get attributes(){return Object.keys(this.attribs).map((f)=>{var R,h;return{name:f,value:this.attribs[f],namespace:(R=this["x-attribsNamespace"])===null||R===void 0?void 0:R[f],prefix:(h=this["x-attribsPrefix"])===null||h===void 0?void 0:h[f]}})}}function oh(f){return YN(f)}function tJ(f){return f.type===V.CDATA}function f5(f){return f.type===V.Text}function R5(f){return f.type===V.Comment}function h5(f){return f.type===V.Directive}function $5(f){return f.type===V.Root}function wN(f,R=!1){let h;if(f5(f))h=new i0(f.data);else if(R5(f))h=new dh(f.data);else if(oh(f)){let $=R?j3(f.children):[],G=new ph(f.name,{...f.attribs},$);if($.forEach((A)=>A.parent=G),f.namespace!=null)G.namespace=f.namespace;if(f["x-attribsNamespace"])G["x-attribsNamespace"]={...f["x-attribsNamespace"]};if(f["x-attribsPrefix"])G["x-attribsPrefix"]={...f["x-attribsPrefix"]};h=G}else if(tJ(f)){let $=R?j3(f.children):[],G=new rh($);$.forEach((A)=>A.parent=G),h=G}else if($5(f)){let $=R?j3(f.children):[],G=new r0($);if($.forEach((A)=>A.parent=G),f["x-mode"])G["x-mode"]=f["x-mode"];h=G}else if(h5(f)){let $=new ah(f.name,f.data);if(f["x-name"]!=null)$["x-name"]=f["x-name"],$["x-publicId"]=f["x-publicId"],$["x-systemId"]=f["x-systemId"];h=$}else throw Error(`Not implemented yet: ${f.type}`);if(h.startIndex=f.startIndex,h.endIndex=f.endIndex,f.sourceCodeLocation!=null)h.sourceCodeLocation=f.sourceCodeLocation;return h}function j3(f){let R=f.map((h)=>wN(h,!0));for(let h=1;h<R.length;h++)R[h].prev=R[h-1],R[h-1].next=R[h];return R}var qN={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class O3{constructor(f,R,h){if(this.dom=[],this.root=new r0(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof R==="function")h=R,R=qN;if(typeof f==="object")R=f,f=void 0;this.callback=f!==null&&f!==void 0?f:null,this.options=R!==null&&R!==void 0?R:qN,this.elementCB=h!==null&&h!==void 0?h:null}onparserinit(f){this.parser=f}onreset(){this.dom=[],this.root=new r0(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){if(this.done)return;this.done=!0,this.parser=null,this.handleCallback(null)}onerror(f){this.handleCallback(f)}onclosetag(){this.lastNode=null;let f=this.tagStack.pop();if(this.options.withEndIndices)f.endIndex=this.parser.endIndex;if(this.elementCB)this.elementCB(f)}onopentag(f,R){let h=this.options.xmlMode?V.Tag:void 0,$=new ph(f,R,void 0,h);this.addNode($),this.tagStack.push($)}ontext(f){let{lastNode:R}=this;if(R&&R.type===V.Text){if(R.data+=f,this.options.withEndIndices)R.endIndex=this.parser.endIndex}else{let h=new i0(f);this.addNode(h),this.lastNode=h}}oncomment(f){if(this.lastNode&&this.lastNode.type===V.Comment){this.lastNode.data+=f;return}let R=new dh(f);this.addNode(R),this.lastNode=R}oncommentend(){this.lastNode=null}oncdatastart(){let f=new i0(""),R=new rh([f]);this.addNode(R),f.parent=R,this.lastNode=f}oncdataend(){this.lastNode=null}onprocessinginstruction(f,R){let h=new ah(f,R);this.addNode(h)}handleCallback(f){if(typeof this.callback==="function")this.callback(f,this.dom);else if(f)throw f}addNode(f){let R=this.tagStack[this.tagStack.length-1],h=R.children[R.children.length-1];if(this.options.withStartIndices)f.startIndex=this.parser.startIndex;if(this.options.withEndIndices)f.endIndex=this.parser.endIndex;if(R.children.push(f),h)f.prev=h,h.next=f;f.parent=R,this.lastNode=null}}var G5=/\n/g;function A5(f){let R=[...f.matchAll(G5)].map(($)=>$.index||0);R.unshift(-1);let h=V3(R,0,R.length);return($)=>BN(h,$)}function V3(f,R,h){if(h-R==1)return{offset:f[R],index:R+1};let $=Math.ceil((R+h)/2),G=V3(f,R,$),A=V3(f,$,h);return{offset:G.offset,low:G,high:A}}function BN(f,R){return function(h){return Object.prototype.hasOwnProperty.call(h,"index")}(f)?{line:f.index,column:R-f.offset}:BN(f.high.offset<R?f.high:f.low,R)}function E3(f,R="",h={}){let $=typeof R!="string"?R:h,G=typeof R=="string"?R:"",A=f.map(W5),W=!!$.lineNumbers;return function(F,N=0){let U=W?A5(F):()=>({line:0,column:0}),J=N,X=[];f:for(;J<F.length;){let z=!1;for(let S of A){S.regex.lastIndex=J;let B=S.regex.exec(F);if(B&&B[0].length>0){if(!S.discard){let C=U(J),i=typeof S.replace=="string"?B[0].replace(new RegExp(S.regex.source,S.regex.flags),S.replace):B[0];X.push({state:G,name:S.name,text:i,offset:J,len:B[0].length,line:C.line,column:C.column})}if(J=S.regex.lastIndex,z=!0,S.push){let C=S.push(F,J);X.push(...C.tokens),J=C.offset}if(S.pop)break f;break}}if(!z)break}return{tokens:X,offset:J,complete:F.length<=J}}}function W5(f,R){return{...f,regex:F5(f,R)}}function F5(f,R){if(f.name.length===0)throw Error(`Rule #${R} has empty name, which is not allowed.`);if(function(h){return Object.prototype.hasOwnProperty.call(h,"regex")}(f))return function(h){if(h.global)throw Error(`Regular expression /${h.source}/${h.flags} contains the global flag, which is not allowed.`);return h.sticky?h:new RegExp(h.source,h.flags+"y")}(f.regex);if(function(h){return Object.prototype.hasOwnProperty.call(h,"str")}(f)){if(f.str.length===0)throw Error(`Rule #${R} ("${f.name}") has empty "str" property, which is not allowed.`);return new RegExp(PN(f.str),"y")}return new RegExp(PN(f.name),"y")}function PN(f){return f.replace(/[-[\]{}()*+!<=:?./\\^$|#\s,]/g,"\\$&")}function kf(f,R){return(h,$)=>{let G=$,A=void 0;if($<h.tokens.length){if(A=f(h.tokens[$],h,$),A!==void 0)G++}else R?.(h,$);return A===void 0?{matched:!1}:{matched:!0,position:G,value:A}}}function T3(f,R){return f.matched?{matched:!0,position:f.position,value:R(f.value,f.position)}:f}function nh(f,R){return f.matched?R(f):f}function Uf(f,R){return(h,$)=>T3(f(h,$),(G,A)=>R(G,h,$,A))}function p0(f,R){return(h,$)=>{let G=f(h,$);return G.matched?G:{matched:!0,position:$,value:R}}}function tR(...f){return(R,h)=>{for(let $ of f){let G=$(R,h);if(G.matched)return G}return{matched:!1}}}function AR(f,R){return(h,$)=>{let G=f(h,$);return G.matched?G:R(h,$)}}function N5(f,R){return(h,$)=>{let G=[],A=!0;do{let W=f(h,$);if(W.matched&&R(W.value,G.length+1,h,$,W.position))G.push(W.value),$=W.position;else A=!1}while(A);return{matched:!0,position:$,value:G}}}function uh(f){return N5(f,()=>!0)}function KN(f){return Zf(f,uh(f),(R,h)=>[R,...h])}function Zf(f,R,h){return($,G)=>nh(f($,G),(A)=>T3(R($,A.position),(W,F)=>h(A.value,W,$,G,F)))}function vN(f,R){return Zf(f,R,(h)=>h)}function g3(f,R){return Zf(f,R,(h,$)=>$)}function eh(f,R,h,$){return(G,A)=>nh(f(G,A),(W)=>nh(R(G,W.position),(F)=>T3(h(G,F.position),(N,U)=>$(W.value,F.value,N,G,A,U))))}function C3(f,R,h){return eh(f,R,h,($,G)=>G)}function U5(...f){return(R,h)=>{let $=[],G=h;for(let A of f){let W=A(R,G);if(W.matched)$.push(W.value),G=W.position;else return{matched:!1}}return{matched:!0,position:G,value:$}}}function jN(...f){return H5(U5(...f))}function H5(f){return Uf(f,(R)=>R.flatMap((h)=>h))}function Y5(f,R){return(h,$)=>{let G=!0,A=f,W=$;do{let F=R(A,h,W)(h,W);if(F.matched)A=F.value,W=F.position;else G=!1}while(G);return{matched:!0,position:W,value:A}}}function Z5(f,R,h){return Y5(f,($)=>Uf(R,(G,A,W,F)=>h($,G,A,W,F)))}function m3(f,R,h){return J5(f,($)=>Z5($,Zf(R,h,(G,A)=>[G,A]),(G,[A,W])=>A(G,W)))}function J5(f,R){return(h,$)=>nh(f(h,$),(G)=>R(G.value,h,$,G.position)(h,G.position))}var X5="(?:[ \\t\\r\\n\\f]*)",gN="(?:\\n|\\r\\n|\\r|\\f)",R$="[^\\x00-\\x7F]",u0="(?:\\\\[0-9a-f]{1,6}(?:\\r\\n|[ \\n\\r\\t\\f])?)",e0="(?:\\\\[^\\n\\r\\f0-9a-f])",S5=`(?:[_a-z]|${R$}|${u0}|${e0})`,CN=`(?:[_a-z0-9-]|${R$}|${u0}|${e0})`,D5=`(?:${CN}+)`,z5=`(?:[-]?${S5}${CN}*)`,Q5=`'([^\\n\\r\\f\\\\']|\\\\${gN}|${R$}|${u0}|${e0})*'`,L5=`"([^\\n\\r\\f\\\\"]|\\\\${gN}|${R$}|${u0}|${e0})*"`,I5=E3([{name:"ws",regex:new RegExp(X5)},{name:"hash",regex:new RegExp(`#${D5}`,"i")},{name:"ident",regex:new RegExp(z5,"i")},{name:"str1",regex:new RegExp(Q5,"i")},{name:"str2",regex:new RegExp(L5,"i")},{name:"*"},{name:"."},{name:","},{name:"["},{name:"]"},{name:"="},{name:">"},{name:"|"},{name:"+"},{name:"~"},{name:"^"},{name:"$"}]),w5=E3([{name:"unicode",regex:new RegExp(u0,"i")},{name:"escape",regex:new RegExp(e0,"i")},{name:"any",regex:new RegExp("[\\s\\S]","i")}]);function mN([f,R,h],[$,G,A]){return[f+$,R+G,h+A]}function q5(f){return f.reduce(mN,[0,0,0])}var P5=kf((f)=>f.name==="unicode"?String.fromCodePoint(parseInt(f.text.slice(1),16)):void 0),B5=kf((f)=>f.name==="escape"?f.text.slice(1):void 0),K5=kf((f)=>f.name==="any"?f.text:void 0),v5=Uf(uh(tR(P5,B5,K5)),(f)=>f.join(""));function x3(f){let R=w5(f);return v5({tokens:R.tokens,options:void 0},0).value}function l(f){return kf((R)=>R.name===f?!0:void 0)}var k3=kf((f)=>f.name==="ws"?null:void 0),c3=p0(k3,null);function R0(f){return C3(c3,f,c3)}var n0=kf((f)=>f.name==="ident"?x3(f.text):void 0),j5=kf((f)=>f.name==="hash"?x3(f.text.slice(1)):void 0),y5=kf((f)=>f.name.startsWith("str")?x3(f.text.slice(1,-1)):void 0),cN=vN(p0(n0,""),l("|")),l3=AR(Zf(cN,n0,(f,R)=>({name:R,namespace:f})),Uf(n0,(f)=>({name:f,namespace:null}))),O5=AR(Zf(cN,l("*"),(f)=>({type:"universal",namespace:f,specificity:[0,0,0]})),Uf(l("*"),()=>({type:"universal",namespace:null,specificity:[0,0,0]}))),V5=Uf(l3,({name:f,namespace:R})=>({type:"tag",name:f,namespace:R,specificity:[0,0,1]})),E5=Zf(l("."),n0,(f,R)=>({type:"class",name:R,specificity:[0,1,0]})),T5=Uf(j5,(f)=>({type:"id",name:f,specificity:[1,0,0]})),yN=kf((f)=>{if(f.name==="ident"){if(f.text==="i"||f.text==="I")return"i";if(f.text==="s"||f.text==="S")return"s"}return}),g5=AR(Zf(y5,p0(g3(c3,yN),null),(f,R)=>({value:f,modifier:R})),Zf(n0,p0(g3(k3,yN),null),(f,R)=>({value:f,modifier:R}))),C5=tR(Uf(l("="),()=>"="),Zf(l("~"),l("="),()=>"~="),Zf(l("|"),l("="),()=>"|="),Zf(l("^"),l("="),()=>"^="),Zf(l("$"),l("="),()=>"$="),Zf(l("*"),l("="),()=>"*=")),m5=eh(l("["),R0(l3),l("]"),(f,{name:R,namespace:h})=>({type:"attrPresence",name:R,namespace:h,specificity:[0,1,0]})),c5=C3(l("["),eh(R0(l3),C5,R0(g5),({name:f,namespace:R},h,{value:$,modifier:G})=>({type:"attrValue",name:f,namespace:R,matcher:h,value:$,modifier:G,specificity:[0,1,0]})),l("]")),b5=AR(m5,c5),x5=AR(O5,V5),ON=tR(T5,E5,b5),VN=Uf(AR(jN(x5,uh(ON)),KN(ON)),(f)=>{return{type:"compound",list:f,specificity:q5(f.map((R)=>R.specificity))}}),k5=tR(Uf(l(">"),()=>">"),Uf(l("+"),()=>"+"),Uf(l("~"),()=>"~"),Zf(l("|"),l("|"),()=>"||")),l5=AR(R0(k5),Uf(k3,()=>" ")),b3=m3(VN,Uf(l5,(f)=>(R,h)=>({type:"compound",list:[...h.list,{type:"combinator",combinator:f,left:R,specificity:R.specificity}],specificity:mN(R.specificity,h.specificity)})),VN),gP=m3(Uf(b3,(f)=>({type:"list",list:[f]})),Uf(R0(l(",")),()=>(f,R)=>({type:"list",list:[...f.list,R]})),b3);function s5(f,R){if(!(typeof R==="string"||R instanceof String))throw Error("Expected a selector string. Actual input is not a string!");let h=I5(R);if(!h.complete)throw Error(`The input "${R}" was only partially tokenized, stopped at offset ${h.offset}!
54
54
  `+EN(R,h.offset));let $=R0(f)({tokens:h.tokens,options:void 0},0);if(!$.matched)throw Error(`No match for "${R}" input!`);if($.position<h.tokens.length){let G=h.tokens[$.position];throw Error(`The input "${R}" was only partially parsed, stopped at offset ${G.offset}!
55
55
  `+EN(R,G.offset,G.len))}return $.value}function EN(f,R,h=1){return`${f.replace(/(\t)|(\r)|(\n)/g,($,G,A)=>G?"\u2409":A?"\u240D":"\u240A")}
56
56
  ${"".padEnd(R)}${"^".repeat(h)}`}function bN(f){return s5(b3,f)}function Ef(f){if(!f.type)throw Error("This is not an AST node.");switch(f.type){case"universal":return th(f.namespace)+"*";case"tag":return th(f.namespace)+f0(f.name);case"class":return"."+f0(f.name);case"id":return"#"+f0(f.name);case"attrPresence":return`[${th(f.namespace)}${f0(f.name)}]`;case"attrValue":return`[${th(f.namespace)}${f0(f.name)}${f.matcher}"${_5(f.value)}"${f.modifier?f.modifier:""}]`;case"combinator":return Ef(f.left)+f.combinator;case"compound":return f.list.reduce((R,h)=>{if(h.type==="combinator")return Ef(h)+R;else return R+Ef(h)},"");case"list":return f.list.map(Ef).join(",")}}function th(f){return f||f===""?f0(f)+"|":""}function f$(f){return`\\${f.codePointAt(0).toString(16)} `}function f0(f){return f.replace(/(^[0-9])|(^-[0-9])|(^-$)|([-0-9a-zA-Z_]|[^\x00-\x7F])|(\x00)|([\x01-\x1f]|\x7f)|([\s\S])/g,(R,h,$,G,A,W,F,N)=>h?f$(h):$?"-"+f$($.slice(1)):G?"\\-":A?A:W?"\uFFFD":F?f$(F):"\\"+N)}function _5(f){return f.replace(/(")|(\\)|(\x00)|([\x01-\x1f]|\x7f)/g,(R,h,$,G,A)=>h?"\\\"":$?"\\\\":G?"\uFFFD":f$(A))}function o0(f){if(!f.type)throw Error("This is not an AST node.");switch(f.type){case"compound":{f.list.forEach(o0),f.list.sort((R,h)=>xN(TN(R),TN(h)));break}case"combinator":{o0(f.left);break}case"list":{f.list.forEach(o0),f.list.sort((R,h)=>Ef(R)<Ef(h)?-1:1);break}}return f}function TN(f){switch(f.type){case"universal":return[1];case"tag":return[1];case"id":return[2];case"class":return[3,f.name];case"attrPresence":return[4,Ef(f)];case"attrValue":return[5,Ef(f)];case"combinator":return[15,Ef(f)]}}function s3(f,R){return xN(f,R)}function xN(f,R){if(!Array.isArray(f)||!Array.isArray(R))throw Error("Arguments must be arrays.");let h=f.length<R.length?f.length:R.length;for(let $=0;$<h;$++){if(f[$]===R[$])continue;return f[$]<R[$]?-1:1}return f.length-R.length}class h${constructor(f){this.branches=h0(a5(f))}build(f){return f(this.branches)}}function a5(f){let R=f.length,h=Array(R);for(let $=0;$<R;$++){let[G,A]=f[$],W=i5(bN(G));h[$]={ast:W,terminal:{type:"terminal",valueContainer:{index:$,value:A,specificity:W.specificity}}}}return h}function i5(f){return lN(f),o0(f),f}function lN(f){let R=[];f.list.forEach((h)=>{switch(h.type){case"class":R.push({matcher:"~=",modifier:null,name:"class",namespace:null,specificity:h.specificity,type:"attrValue",value:h.name});break;case"id":R.push({matcher:"=",modifier:null,name:"id",namespace:null,specificity:h.specificity,type:"attrValue",value:h.name});break;case"combinator":lN(h.left),R.push(h);break;case"universal":break;default:R.push(h);break}}),f.list=R}function h0(f){let R=[];while(f.length){let h=dN(f,(W)=>!0,sN),{matches:$,nonmatches:G,empty:A}=p5(f,h);if(f=G,$.length)R.push(o5(h,$));if(A.length)R.push(...r5(A))}return R}function r5(f){let R=[];for(let h of f){let $=h.terminal;if($.type==="terminal")R.push($);else{let{matches:G,rest:A}=fM($.cont,(W)=>W.type==="terminal");if(G.forEach((W)=>R.push(W)),A.length)$.cont=A,R.push($)}}return R}function p5(f,R){let h=[],$=[],G=[];for(let A of f){let W=A.ast.list;if(W.length)(W.some((N)=>sN(N)===R)?h:$).push(A);else G.push(A)}return{matches:h,nonmatches:$,empty:G}}function sN(f){switch(f.type){case"attrPresence":return`attrPresence ${f.name}`;case"attrValue":return`attrValue ${f.name}`;case"combinator":return`combinator ${f.combinator}`;default:return f.type}}function o5(f,R){if(f==="tag")return n5(R);if(f.startsWith("attrValue "))return e5(f.substring(10),R);if(f.startsWith("attrPresence "))return u5(f.substring(13),R);if(f==="combinator >")return kN(">",R);if(f==="combinator +")return kN("+",R);throw Error(`Unsupported selector kind: ${f}`)}function n5(f){let R=_3(f,($)=>$.type==="tag",($)=>$.name);return{type:"tagName",variants:Object.entries(R).map(([$,G])=>({type:"variant",value:$,cont:h0(G.items)}))}}function u5(f,R){for(let h of R)_N(h,($)=>$.type==="attrPresence"&&$.name===f);return{type:"attrPresence",name:f,cont:h0(R)}}function e5(f,R){let h=_3(R,(G)=>G.type==="attrValue"&&G.name===f,(G)=>`${G.matcher} ${G.modifier||""} ${G.value}`),$=[];for(let G of Object.values(h)){let A=G.oneSimpleSelector,W=t5(A),F=h0(G.items);$.push({type:"matcher",matcher:A.matcher,modifier:A.modifier,value:A.value,predicate:W,cont:F})}return{type:"attrValue",name:f,matchers:$}}function t5(f){if(f.modifier==="i"){let R=f.value.toLowerCase();switch(f.matcher){case"=":return(h)=>R===h.toLowerCase();case"~=":return(h)=>h.toLowerCase().split(/[ \t]+/).includes(R);case"^=":return(h)=>h.toLowerCase().startsWith(R);case"$=":return(h)=>h.toLowerCase().endsWith(R);case"*=":return(h)=>h.toLowerCase().includes(R);case"|=":return(h)=>{let $=h.toLowerCase();return R===$||$.startsWith(R)&&$[R.length]==="-"}}}else{let R=f.value;switch(f.matcher){case"=":return(h)=>R===h;case"~=":return(h)=>h.split(/[ \t]+/).includes(R);case"^=":return(h)=>h.startsWith(R);case"$=":return(h)=>h.endsWith(R);case"*=":return(h)=>h.includes(R);case"|=":return(h)=>R===h||h.startsWith(R)&&h[R.length]==="-"}}}function kN(f,R){let h=_3(R,(G)=>G.type==="combinator"&&G.combinator===f,(G)=>Ef(G.left)),$=[];for(let G of Object.values(h)){let A=h0(G.items),W=G.oneSimpleSelector.left;$.push({ast:W,terminal:{type:"popElement",cont:A}})}return{type:"pushElement",combinator:f,cont:h0($)}}function _3(f,R,h){let $={};while(f.length){let G=dN(f,R,h),A=(J)=>R(J)&&h(J)===G,W=(J)=>J.ast.list.some(A),{matches:F,rest:N}=RM(f,W),U=null;for(let J of F){let X=_N(J,A);if(!U)U=X}if(U==null)throw Error("No simple selector is found.");$[G]={oneSimpleSelector:U,items:F},f=N}return $}function _N(f,R){let h=f.ast.list,$=Array(h.length),G=-1;for(let W=h.length;W-- >0;)if(R(h[W]))$[W]=!0,G=W;if(G==-1)throw Error("Couldn't find the required simple selector.");let A=h[G];return f.ast.list=h.filter((W,F)=>!$[F]),A}function dN(f,R,h){let $={};for(let W of f){let F={};for(let N of W.ast.list.filter(R))F[h(N)]=!0;for(let N of Object.keys(F))if($[N])$[N]++;else $[N]=1}let G="",A=0;for(let W of Object.entries($))if(W[1]>A)G=W[0],A=W[1];return G}function fM(f,R){let h=[],$=[];for(let G of f)if(R(G))h.push(G);else $.push(G);return{matches:h,rest:$}}function RM(f,R){let h=[],$=[];for(let G of f)if(R(G))h.push(G);else $.push(G);return{matches:h,rest:$}}class d3{constructor(f){this.f=f}pickAll(f){return this.f(f)}pick1(f,R=!1){let h=this.f(f),$=h.length;if($===0)return null;if($===1)return h[0].value;let G=R?hM:$M,A=h[0];for(let W=1;W<$;W++){let F=h[W];if(G(A,F))A=F}return A.value}}function hM(f,R){let h=s3(R.specificity,f.specificity);return h>0||h===0&&R.index<f.index}function $M(f,R){let h=s3(R.specificity,f.specificity);return h>0||h===0&&R.index>f.index}function a3(f){return new d3($0(f))}function $0(f){let R=f.map(GM);return(h,...$)=>R.flatMap((G)=>G(h,...$))}function GM(f){switch(f.type){case"terminal":{let R=[f.valueContainer];return(h,...$)=>R}case"tagName":return AM(f);case"attrValue":return FM(f);case"attrPresence":return WM(f);case"pushElement":return NM(f);case"popElement":return HM(f)}}function AM(f){let R={};for(let h of f.variants)R[h.value]=$0(h.cont);return(h,...$)=>{let G=R[h.name];return G?G(h,...$):[]}}function WM(f){let R=f.name,h=$0(f.cont);return($,...G)=>Object.prototype.hasOwnProperty.call($.attribs,R)?h($,...G):[]}function FM(f){let R=[];for(let $ of f.matchers){let G=$.predicate,A=$0($.cont);R.push((W,F,...N)=>G(W)?A(F,...N):[])}let h=f.name;return($,...G)=>{let A=$.attribs[h];return A||A===""?R.flatMap((W)=>W(A,$,...G)):[]}}function NM(f){let R=$0(f.cont),h=f.combinator==="+"?aN:UM;return($,...G)=>{let A=h($);if(A===null)return[];return R(A,$,...G)}}var aN=(f)=>{let R=f.prev;if(R===null)return null;return oh(R)?R:aN(R)},UM=(f)=>{let R=f.parent;return R&&oh(R)?R:null};function HM(f){let R=$0(f.cont);return(h,$,...G)=>R($,...G)}var $$=new Uint16Array("\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\x00\x00\x00\x00\x00\x00\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\uD835\uDD04rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\uD835\uDD38plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\uD835\uDC9Cign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\uD835\uDD05pf;\uC000\uD835\uDD39eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\uD835\uDC9Ep\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\uD835\uDD07\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\x00\x00\x00\u0342\u0354\x00\u0405f;\uC000\uD835\uDD3B\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\x00\x00\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\x00\x00\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\x00\u0446\x00\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\x00\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\uD835\uDC9Frok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\uD835\uDD08rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\x00\x00\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\uD835\uDD3Csilon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\uD835\uDD09lled\u0253\u0597\x00\x00\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\x00\u05BF\x00\x00\u05C4f;\uC000\uD835\uDD3DAll;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\uD835\uDD0A;\u62D9pf;\uC000\uD835\uDD3Eeater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\uD835\uDCA2;\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\x00\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\x00\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\uD835\uDD40a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\x00\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\uD835\uDD0Dpf;\uC000\uD835\uDD41\u01E3\u07C7\x00\u07CCr;\uC000\uD835\uDCA5rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\uD835\uDD0Epf;\uC000\uD835\uDD42cr;\uC000\uD835\uDCA6\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\x00\u08C3bleBracket;\u67E6n\u01D4\u08C8\x00\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\uD835\uDD0F\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\uD835\uDD43er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\uD835\uDD10nusPlus;\u6213pf;\uC000\uD835\uDD44c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\uD835\uDD11\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\uD835\uDCA9ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\uD835\uDD12rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\uD835\uDD46enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\uD835\uDCAAash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\uD835\uDD13i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\uD835\uDCAB;\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B\"\u4022r;\uC000\uD835\uDD14pf;\u611Acr;\uC000\uD835\uDCAC\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\x00\u1005bleBracket;\u67E7n\u01D4\u100A\x00\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\uD835\uDD16ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\uD835\uDD4A\u0272\u116D\x00\x00\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\uD835\uDCAEar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\uD835\uDD17\u0100ei\u127B\u1289\u01F2\u1280\x00\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\uD835\uDD4BipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\uD835\uDCAFrok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\x00\u132C\u1331\x00\x00\x00\x00\x00\u1338\u133D\u1377\u1385\x00\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\x00\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\uD835\uDD18rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\uD835\uDD4C\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\uD835\uDCB0ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\uD835\uDD19pf;\uC000\uD835\uDD4Dcr;\uC000\uD835\uDCB1dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\uD835\uDD1Apf;\uC000\uD835\uDD4Ecr;\uC000\uD835\uDCB2\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\uD835\uDD1B;\u439Epf;\uC000\uD835\uDD4Fcr;\uC000\uD835\uDCB3\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\uD835\uDD1Cpf;\uC000\uD835\uDD50cr;\uC000\uD835\uDCB4ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\x00\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\uD835\uDCB5\u0BE1\u1583\u158A\u1590\x00\u15B0\u15B6\u15BF\x00\x00\x00\x00\u15C6\u15DB\u15EB\u165F\u166D\x00\u1695\u169B\u16B2\u16B9\x00\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\uD835\uDD1Erave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\x00\x00\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\uD835\uDD52\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\uD835\uDCB6;\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\uD835\uDD1Fg\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\x00\x00\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\x00\u1833\u01B2\u182F\x00\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\uD835\uDD53\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\uD835\uDCB7mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\x00\u19E8\u1A11\u1A15\u1A32\x00\u1A37\u1A50\x00\x00\u1AB4\x00\x00\u1AC1\x00\x00\u1B21\u1B2E\u1B4D\u1B52\x00\u1BFD\x00\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\x00\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\uD835\uDD20\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\x00\x00\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\x00\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\x00\x00\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\x00\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\uD835\uDD54o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\uD835\uDCB8\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\x00\x00\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\x00\x00\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\uD835\uDD21ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\x00\x00\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\uD835\uDD55\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\x00\x00\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\uD835\uDCB9;\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\uD835\uDD22\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\uD835\uDD56\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\x00\x00\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\x00\u1F9E\x00\u1FA1\u1FA7\x00\x00\u1FC6\u1FCC\x00\u1FD3\x00\u1FE6\u1FEA\u2000\x00\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\x00\x00\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\uD835\uDD23lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\x00\u1FF3f;\uC000\uD835\uDD57\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\x00\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\x00\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\x00\u2036;\u6154;\u6156\u02B4\u203E\u2041\x00\x00\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\x00\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\uD835\uDCBB\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\uD835\uDD24\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\uD835\uDD58\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\x00\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\uD835\uDD25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\uD835\uDD59bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\uD835\uDCBDas\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\x00\u22AA\x00\u22B8\u22C5\u22CE\x00\u22D5\u22F3\x00\x00\u22F8\u2322\u2367\u2362\u237F\x00\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\uD835\uDD26rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\uD835\uDD5Aa;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\uD835\uDCBEn\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\x00\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\uD835\uDD27ath;\u4237pf;\uC000\uD835\uDD5B\u01E3\u23EC\x00\u23F1r;\uC000\uD835\uDCBFrcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\uD835\uDD28reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\uD835\uDD5Ccr;\uC000\uD835\uDCC0\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\x00\u24AA\x00\u24B1\x00\x00\x00\x00\x00\u24B5\u24BA\x00\u24C6\u24C8\u24CD\x00\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\uD835\uDD29\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\uD835\uDD5Dus;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\uD835\uDCC1m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\uD835\uDD2Ao;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\uD835\uDD5E\u0100ct\u28F8\u28FDr;\uC000\uD835\uDCC2pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\x00\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\x00\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\uD835\uDD2B\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\uD835\uDD5F\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\uD835\uDCC3ort\u026D\u2B05\x00\x00\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u2D2D\x00\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\x00\x00\u2D8D\u2DAB\x00\u2DC8\u2DCE\x00\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\uD835\uDD2C\u036F\u2D79\x00\x00\u2D7C\x00\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\uD835\uDD60\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\x00\u2E7D\x00\u2E80\u2E9D\x00\u2EA2\u2EB9\x00\x00\u2ECB\u0E9C\x00\u2F13\x00\x00\u2F2B\u2FBC\x00\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\x00\x00\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\uD835\uDD2D\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\uD835\uDD61nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\uD835\uDCC5;\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\uD835\uDD2Epf;\uC000\uD835\uDD62rime;\u6057cr;\uC000\uD835\uDCC6\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\uD835\uDD2F\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\uD835\uDD63us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\uD835\uDCC7\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\x00\u337A\u33A4\x00\x00\u33EC\u33F0\x00\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\x00\u3616\x00\x00\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\x00\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\uD835\uDD30\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\x00\x00\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\uD835\uDD64a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\uD835\uDCC8tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\x00\u367E\u36C2\x00\x00\x00\x00\x00\u36DB\u3703\x00\u3709\u376C\x00\x00\x00\u3787\u0272\u3656\x00\x00\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\uD835\uDD31\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\x00\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\uD835\uDD65rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\uD835\uDCC9;\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\x00\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\uD835\uDD32rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\x00\x00\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\uD835\uDD66\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\x00\x00\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\uD835\uDCCA\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\uD835\uDD33tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\uD835\uDD67ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\uD835\uDCCB\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\uD835\uDD34pf;\uC000\uD835\uDD68\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\uD835\uDCCC\u0AE3\u178E\u3A87\x00\u3A8B\x00\u3A90\u3A9B\x00\x00\u3A9D\u3AA8\u3AAB\u3AAF\x00\x00\u3AC3\u3ACE\x00\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\uD835\uDD35\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\uD835\uDD69im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\uD835\uDCCD\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\uD835\uDD36cy;\u4457pf;\uC000\uD835\uDD6Acr;\uC000\uD835\uDCCE\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\uD835\uDD37cy;\u4436grarr;\u61DDpf;\uC000\uD835\uDD6Bcr;\uC000\uD835\uDCCF\u0100jn\u3B85\u3B87;\u600Dj;\u600C".split("").map((f)=>f.charCodeAt(0)));var G$=new Uint16Array("\u0200aglq\t\x15\x18\x1B\u026D\x0F\x00\x00\x12p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map((f)=>f.charCodeAt(0)));var i3,YM=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),G0=(i3=String.fromCodePoint)!==null&&i3!==void 0?i3:function(f){let R="";if(f>65535)f-=65536,R+=String.fromCharCode(f>>>10&1023|55296),f=56320|f&1023;return R+=String.fromCharCode(f),R};function t0(f){var R;if(f>=55296&&f<=57343||f>1114111)return 65533;return(R=YM.get(f))!==null&&R!==void 0?R:f}var hf;(function(f){f[f.NUM=35]="NUM",f[f.SEMI=59]="SEMI",f[f.EQUALS=61]="EQUALS",f[f.ZERO=48]="ZERO",f[f.NINE=57]="NINE",f[f.LOWER_A=97]="LOWER_A",f[f.LOWER_F=102]="LOWER_F",f[f.LOWER_X=120]="LOWER_X",f[f.LOWER_Z=122]="LOWER_Z",f[f.UPPER_A=65]="UPPER_A",f[f.UPPER_F=70]="UPPER_F",f[f.UPPER_Z=90]="UPPER_Z"})(hf||(hf={}));var ZM=32,zf;(function(f){f[f.VALUE_LENGTH=49152]="VALUE_LENGTH",f[f.BRANCH_LENGTH=16256]="BRANCH_LENGTH",f[f.JUMP_TABLE=127]="JUMP_TABLE"})(zf||(zf={}));function r3(f){return f>=hf.ZERO&&f<=hf.NINE}function JM(f){return f>=hf.UPPER_A&&f<=hf.UPPER_F||f>=hf.LOWER_A&&f<=hf.LOWER_F}function MM(f){return f>=hf.UPPER_A&&f<=hf.UPPER_Z||f>=hf.LOWER_A&&f<=hf.LOWER_Z||r3(f)}function XM(f){return f===hf.EQUALS||MM(f)}var Rf;(function(f){f[f.EntityStart=0]="EntityStart",f[f.NumericStart=1]="NumericStart",f[f.NumericDecimal=2]="NumericDecimal",f[f.NumericHex=3]="NumericHex",f[f.NamedEntity=4]="NamedEntity"})(Rf||(Rf={}));var vR;(function(f){f[f.Legacy=0]="Legacy",f[f.Strict=1]="Strict",f[f.Attribute=2]="Attribute"})(vR||(vR={}));class iN{constructor(f,R,h){this.decodeTree=f,this.emitCodePoint=R,this.errors=h,this.state=Rf.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=vR.Strict}startEntity(f){this.decodeMode=f,this.state=Rf.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(f,R){switch(this.state){case Rf.EntityStart:{if(f.charCodeAt(R)===hf.NUM)return this.state=Rf.NumericStart,this.consumed+=1,this.stateNumericStart(f,R+1);return this.state=Rf.NamedEntity,this.stateNamedEntity(f,R)}case Rf.NumericStart:return this.stateNumericStart(f,R);case Rf.NumericDecimal:return this.stateNumericDecimal(f,R);case Rf.NumericHex:return this.stateNumericHex(f,R);case Rf.NamedEntity:return this.stateNamedEntity(f,R)}}stateNumericStart(f,R){if(R>=f.length)return-1;if((f.charCodeAt(R)|ZM)===hf.LOWER_X)return this.state=Rf.NumericHex,this.consumed+=1,this.stateNumericHex(f,R+1);return this.state=Rf.NumericDecimal,this.stateNumericDecimal(f,R)}addToNumericResult(f,R,h,$){if(R!==h){let G=h-R;this.result=this.result*Math.pow($,G)+parseInt(f.substr(R,G),$),this.consumed+=G}}stateNumericHex(f,R){let h=R;while(R<f.length){let $=f.charCodeAt(R);if(r3($)||JM($))R+=1;else return this.addToNumericResult(f,h,R,16),this.emitNumericEntity($,3)}return this.addToNumericResult(f,h,R,16),-1}stateNumericDecimal(f,R){let h=R;while(R<f.length){let $=f.charCodeAt(R);if(r3($))R+=1;else return this.addToNumericResult(f,h,R,10),this.emitNumericEntity($,2)}return this.addToNumericResult(f,h,R,10),-1}emitNumericEntity(f,R){var h;if(this.consumed<=R)return(h=this.errors)===null||h===void 0||h.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(f===hf.SEMI)this.consumed+=1;else if(this.decodeMode===vR.Strict)return 0;if(this.emitCodePoint(t0(this.result),this.consumed),this.errors){if(f!==hf.SEMI)this.errors.missingSemicolonAfterCharacterReference();this.errors.validateNumericCharacterReference(this.result)}return this.consumed}stateNamedEntity(f,R){let{decodeTree:h}=this,$=h[this.treeIndex],G=($&zf.VALUE_LENGTH)>>14;for(;R<f.length;R++,this.excess++){let A=f.charCodeAt(R);if(this.treeIndex=p3(h,$,this.treeIndex+Math.max(1,G),A),this.treeIndex<0)return this.result===0||this.decodeMode===vR.Attribute&&(G===0||XM(A))?0:this.emitNotTerminatedNamedEntity();if($=h[this.treeIndex],G=($&zf.VALUE_LENGTH)>>14,G!==0){if(A===hf.SEMI)return this.emitNamedEntityData(this.treeIndex,G,this.consumed+this.excess);if(this.decodeMode!==vR.Strict)this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0}}return-1}emitNotTerminatedNamedEntity(){var f;let{result:R,decodeTree:h}=this,$=(h[R]&zf.VALUE_LENGTH)>>14;return this.emitNamedEntityData(R,$,this.consumed),(f=this.errors)===null||f===void 0||f.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(f,R,h){let{decodeTree:$}=this;if(this.emitCodePoint(R===1?$[f]&~zf.VALUE_LENGTH:$[f+1],h),R===3)this.emitCodePoint($[f+2],h);return h}end(){var f;switch(this.state){case Rf.NamedEntity:return this.result!==0&&(this.decodeMode!==vR.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Rf.NumericDecimal:return this.emitNumericEntity(0,2);case Rf.NumericHex:return this.emitNumericEntity(0,3);case Rf.NumericStart:return(f=this.errors)===null||f===void 0||f.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Rf.EntityStart:return 0}}}function rN(f){let R="",h=new iN(f,($)=>R+=G0($));return function(G,A){let W=0,F=0;while((F=G.indexOf("&",F))>=0){R+=G.slice(W,F),h.startEntity(A);let U=h.write(G,F+1);if(U<0){W=F+h.end();break}W=F+U,F=U===0?W+1:W}let N=R+G.slice(W);return R="",N}}function p3(f,R,h,$){let G=(R&zf.BRANCH_LENGTH)>>7,A=R&zf.JUMP_TABLE;if(G===0)return A!==0&&$===A?h:-1;if(A){let N=$-A;return N<0||N>=G?-1:f[h+N]-1}let W=h,F=W+G-1;while(W<=F){let N=W+F>>>1,U=f[N];if(U<$)W=N+1;else if(U>$)F=N-1;else return f[N+G]}return-1}var rP=rN($$),pP=rN(G$);var D;(function(f){f[f.Tab=9]="Tab",f[f.NewLine=10]="NewLine",f[f.FormFeed=12]="FormFeed",f[f.CarriageReturn=13]="CarriageReturn",f[f.Space=32]="Space",f[f.ExclamationMark=33]="ExclamationMark",f[f.Number=35]="Number",f[f.Amp=38]="Amp",f[f.SingleQuote=39]="SingleQuote",f[f.DoubleQuote=34]="DoubleQuote",f[f.Dash=45]="Dash",f[f.Slash=47]="Slash",f[f.Zero=48]="Zero",f[f.Nine=57]="Nine",f[f.Semi=59]="Semi",f[f.Lt=60]="Lt",f[f.Eq=61]="Eq",f[f.Gt=62]="Gt",f[f.Questionmark=63]="Questionmark",f[f.UpperA=65]="UpperA",f[f.LowerA=97]="LowerA",f[f.UpperF=70]="UpperF",f[f.LowerF=102]="LowerF",f[f.UpperZ=90]="UpperZ",f[f.LowerZ=122]="LowerZ",f[f.LowerX=120]="LowerX",f[f.OpeningSquareBracket=91]="OpeningSquareBracket"})(D||(D={}));var Z;(function(f){f[f.Text=1]="Text",f[f.BeforeTagName=2]="BeforeTagName",f[f.InTagName=3]="InTagName",f[f.InSelfClosingTag=4]="InSelfClosingTag",f[f.BeforeClosingTagName=5]="BeforeClosingTagName",f[f.InClosingTagName=6]="InClosingTagName",f[f.AfterClosingTagName=7]="AfterClosingTagName",f[f.BeforeAttributeName=8]="BeforeAttributeName",f[f.InAttributeName=9]="InAttributeName",f[f.AfterAttributeName=10]="AfterAttributeName",f[f.BeforeAttributeValue=11]="BeforeAttributeValue",f[f.InAttributeValueDq=12]="InAttributeValueDq",f[f.InAttributeValueSq=13]="InAttributeValueSq",f[f.InAttributeValueNq=14]="InAttributeValueNq",f[f.BeforeDeclaration=15]="BeforeDeclaration",f[f.InDeclaration=16]="InDeclaration",f[f.InProcessingInstruction=17]="InProcessingInstruction",f[f.BeforeComment=18]="BeforeComment",f[f.CDATASequence=19]="CDATASequence",f[f.InSpecialComment=20]="InSpecialComment",f[f.InCommentLike=21]="InCommentLike",f[f.BeforeSpecialS=22]="BeforeSpecialS",f[f.SpecialStartSequence=23]="SpecialStartSequence",f[f.InSpecialTag=24]="InSpecialTag",f[f.BeforeEntity=25]="BeforeEntity",f[f.BeforeNumericEntity=26]="BeforeNumericEntity",f[f.InNamedEntity=27]="InNamedEntity",f[f.InNumericEntity=28]="InNumericEntity",f[f.InHexEntity=29]="InHexEntity"})(Z||(Z={}));function af(f){return f===D.Space||f===D.NewLine||f===D.Tab||f===D.FormFeed||f===D.CarriageReturn}function A$(f){return f===D.Slash||f===D.Gt||af(f)}function pN(f){return f>=D.Zero&&f<=D.Nine}function SM(f){return f>=D.LowerA&&f<=D.LowerZ||f>=D.UpperA&&f<=D.UpperZ}function DM(f){return f>=D.UpperA&&f<=D.UpperF||f>=D.LowerA&&f<=D.LowerF}var Tf;(function(f){f[f.NoValue=0]="NoValue",f[f.Unquoted=1]="Unquoted",f[f.Single=2]="Single",f[f.Double=3]="Double"})(Tf||(Tf={}));var Sf={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])};class W${constructor({xmlMode:f=!1,decodeEntities:R=!0},h){this.cbs=h,this.state=Z.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=Z.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=f,this.decodeEntities=R,this.entityTrie=f?G$:$$}reset(){this.state=Z.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=Z.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(f){this.offset+=this.buffer.length,this.buffer=f,this.parse()}end(){if(this.running)this.finish()}pause(){this.running=!1}resume(){if(this.running=!0,this.index<this.buffer.length+this.offset)this.parse()}getIndex(){return this.index}getSectionStart(){return this.sectionStart}stateText(f){if(f===D.Lt||!this.decodeEntities&&this.fastForwardTo(D.Lt)){if(this.index>this.sectionStart)this.cbs.ontext(this.sectionStart,this.index);this.state=Z.BeforeTagName,this.sectionStart=this.index}else if(this.decodeEntities&&f===D.Amp)this.state=Z.BeforeEntity}stateSpecialStartSequence(f){let R=this.sequenceIndex===this.currentSequence.length;if(!(R?A$(f):(f|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!R){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=Z.InTagName,this.stateInTagName(f)}stateInSpecialTag(f){if(this.sequenceIndex===this.currentSequence.length){if(f===D.Gt||af(f)){let R=this.index-this.currentSequence.length;if(this.sectionStart<R){let h=this.index;this.index=R,this.cbs.ontext(this.sectionStart,R),this.index=h}this.isSpecial=!1,this.sectionStart=R+2,this.stateInClosingTagName(f);return}this.sequenceIndex=0}if((f|32)===this.currentSequence[this.sequenceIndex])this.sequenceIndex+=1;else if(this.sequenceIndex===0){if(this.currentSequence===Sf.TitleEnd){if(this.decodeEntities&&f===D.Amp)this.state=Z.BeforeEntity}else if(this.fastForwardTo(D.Lt))this.sequenceIndex=1}else this.sequenceIndex=Number(f===D.Lt)}stateCDATASequence(f){if(f===Sf.Cdata[this.sequenceIndex]){if(++this.sequenceIndex===Sf.Cdata.length)this.state=Z.InCommentLike,this.currentSequence=Sf.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1}else this.sequenceIndex=0,this.state=Z.InDeclaration,this.stateInDeclaration(f)}fastForwardTo(f){while(++this.index<this.buffer.length+this.offset)if(this.buffer.charCodeAt(this.index-this.offset)===f)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(f){if(f===this.currentSequence[this.sequenceIndex]){if(++this.sequenceIndex===this.currentSequence.length){if(this.currentSequence===Sf.CdataEnd)this.cbs.oncdata(this.sectionStart,this.index,2);else this.cbs.oncomment(this.sectionStart,this.index,2);this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=Z.Text}}else if(this.sequenceIndex===0){if(this.fastForwardTo(this.currentSequence[0]))this.sequenceIndex=1}else if(f!==this.currentSequence[this.sequenceIndex-1])this.sequenceIndex=0}isTagStartChar(f){return this.xmlMode?!A$(f):SM(f)}startSpecial(f,R){this.isSpecial=!0,this.currentSequence=f,this.sequenceIndex=R,this.state=Z.SpecialStartSequence}stateBeforeTagName(f){if(f===D.ExclamationMark)this.state=Z.BeforeDeclaration,this.sectionStart=this.index+1;else if(f===D.Questionmark)this.state=Z.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(f)){let R=f|32;if(this.sectionStart=this.index,!this.xmlMode&&R===Sf.TitleEnd[2])this.startSpecial(Sf.TitleEnd,3);else this.state=!this.xmlMode&&R===Sf.ScriptEnd[2]?Z.BeforeSpecialS:Z.InTagName}else if(f===D.Slash)this.state=Z.BeforeClosingTagName;else this.state=Z.Text,this.stateText(f)}stateInTagName(f){if(A$(f))this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=Z.BeforeAttributeName,this.stateBeforeAttributeName(f)}stateBeforeClosingTagName(f){if(af(f));else if(f===D.Gt)this.state=Z.Text;else this.state=this.isTagStartChar(f)?Z.InClosingTagName:Z.InSpecialComment,this.sectionStart=this.index}stateInClosingTagName(f){if(f===D.Gt||af(f))this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=Z.AfterClosingTagName,this.stateAfterClosingTagName(f)}stateAfterClosingTagName(f){if(f===D.Gt||this.fastForwardTo(D.Gt))this.state=Z.Text,this.baseState=Z.Text,this.sectionStart=this.index+1}stateBeforeAttributeName(f){if(f===D.Gt){if(this.cbs.onopentagend(this.index),this.isSpecial)this.state=Z.InSpecialTag,this.sequenceIndex=0;else this.state=Z.Text;this.baseState=this.state,this.sectionStart=this.index+1}else if(f===D.Slash)this.state=Z.InSelfClosingTag;else if(!af(f))this.state=Z.InAttributeName,this.sectionStart=this.index}stateInSelfClosingTag(f){if(f===D.Gt)this.cbs.onselfclosingtag(this.index),this.state=Z.Text,this.baseState=Z.Text,this.sectionStart=this.index+1,this.isSpecial=!1;else if(!af(f))this.state=Z.BeforeAttributeName,this.stateBeforeAttributeName(f)}stateInAttributeName(f){if(f===D.Eq||A$(f))this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=Z.AfterAttributeName,this.stateAfterAttributeName(f)}stateAfterAttributeName(f){if(f===D.Eq)this.state=Z.BeforeAttributeValue;else if(f===D.Slash||f===D.Gt)this.cbs.onattribend(Tf.NoValue,this.index),this.state=Z.BeforeAttributeName,this.stateBeforeAttributeName(f);else if(!af(f))this.cbs.onattribend(Tf.NoValue,this.index),this.state=Z.InAttributeName,this.sectionStart=this.index}stateBeforeAttributeValue(f){if(f===D.DoubleQuote)this.state=Z.InAttributeValueDq,this.sectionStart=this.index+1;else if(f===D.SingleQuote)this.state=Z.InAttributeValueSq,this.sectionStart=this.index+1;else if(!af(f))this.sectionStart=this.index,this.state=Z.InAttributeValueNq,this.stateInAttributeValueNoQuotes(f)}handleInAttributeValue(f,R){if(f===R||!this.decodeEntities&&this.fastForwardTo(R))this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(R===D.DoubleQuote?Tf.Double:Tf.Single,this.index),this.state=Z.BeforeAttributeName;else if(this.decodeEntities&&f===D.Amp)this.baseState=this.state,this.state=Z.BeforeEntity}stateInAttributeValueDoubleQuotes(f){this.handleInAttributeValue(f,D.DoubleQuote)}stateInAttributeValueSingleQuotes(f){this.handleInAttributeValue(f,D.SingleQuote)}stateInAttributeValueNoQuotes(f){if(af(f)||f===D.Gt)this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(Tf.Unquoted,this.index),this.state=Z.BeforeAttributeName,this.stateBeforeAttributeName(f);else if(this.decodeEntities&&f===D.Amp)this.baseState=this.state,this.state=Z.BeforeEntity}stateBeforeDeclaration(f){if(f===D.OpeningSquareBracket)this.state=Z.CDATASequence,this.sequenceIndex=0;else this.state=f===D.Dash?Z.BeforeComment:Z.InDeclaration}stateInDeclaration(f){if(f===D.Gt||this.fastForwardTo(D.Gt))this.cbs.ondeclaration(this.sectionStart,this.index),this.state=Z.Text,this.sectionStart=this.index+1}stateInProcessingInstruction(f){if(f===D.Gt||this.fastForwardTo(D.Gt))this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=Z.Text,this.sectionStart=this.index+1}stateBeforeComment(f){if(f===D.Dash)this.state=Z.InCommentLike,this.currentSequence=Sf.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1;else this.state=Z.InDeclaration}stateInSpecialComment(f){if(f===D.Gt||this.fastForwardTo(D.Gt))this.cbs.oncomment(this.sectionStart,this.index,0),this.state=Z.Text,this.sectionStart=this.index+1}stateBeforeSpecialS(f){let R=f|32;if(R===Sf.ScriptEnd[3])this.startSpecial(Sf.ScriptEnd,4);else if(R===Sf.StyleEnd[3])this.startSpecial(Sf.StyleEnd,4);else this.state=Z.InTagName,this.stateInTagName(f)}stateBeforeEntity(f){if(this.entityExcess=1,this.entityResult=0,f===D.Number)this.state=Z.BeforeNumericEntity;else if(f===D.Amp);else this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=Z.InNamedEntity,this.stateInNamedEntity(f)}stateInNamedEntity(f){if(this.entityExcess+=1,this.trieIndex=p3(this.entityTrie,this.trieCurrent,this.trieIndex+1,f),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];let R=this.trieCurrent&zf.VALUE_LENGTH;if(R){let h=(R>>14)-1;if(!this.allowLegacyEntity()&&f!==D.Semi)this.trieIndex+=h;else{let $=this.index-this.entityExcess+1;if($>this.sectionStart)this.emitPartial(this.sectionStart,$);if(this.entityResult=this.trieIndex,this.trieIndex+=h,this.entityExcess=0,this.sectionStart=this.index+1,h===0)this.emitNamedEntity()}}}emitNamedEntity(){if(this.state=this.baseState,this.entityResult===0)return;switch((this.entityTrie[this.entityResult]&zf.VALUE_LENGTH)>>14){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~zf.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}stateBeforeNumericEntity(f){if((f|32)===D.LowerX)this.entityExcess++,this.state=Z.InHexEntity;else this.state=Z.InNumericEntity,this.stateInNumericEntity(f)}emitNumericEntity(f){let R=this.index-this.entityExcess-1;if(R+2+Number(this.state===Z.InHexEntity)!==this.index){if(R>this.sectionStart)this.emitPartial(this.sectionStart,R);this.sectionStart=this.index+Number(f),this.emitCodePoint(t0(this.entityResult))}this.state=this.baseState}stateInNumericEntity(f){if(f===D.Semi)this.emitNumericEntity(!0);else if(pN(f))this.entityResult=this.entityResult*10+(f-D.Zero),this.entityExcess++;else{if(this.allowLegacyEntity())this.emitNumericEntity(!1);else this.state=this.baseState;this.index--}}stateInHexEntity(f){if(f===D.Semi)this.emitNumericEntity(!0);else if(pN(f))this.entityResult=this.entityResult*16+(f-D.Zero),this.entityExcess++;else if(DM(f))this.entityResult=this.entityResult*16+((f|32)-D.LowerA+10),this.entityExcess++;else{if(this.allowLegacyEntity())this.emitNumericEntity(!1);else this.state=this.baseState;this.index--}}allowLegacyEntity(){return!this.xmlMode&&(this.baseState===Z.Text||this.baseState===Z.InSpecialTag)}cleanup(){if(this.running&&this.sectionStart!==this.index){if(this.state===Z.Text||this.state===Z.InSpecialTag&&this.sequenceIndex===0)this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index;else if(this.state===Z.InAttributeValueDq||this.state===Z.InAttributeValueSq||this.state===Z.InAttributeValueNq)this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index}}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){while(this.shouldContinue()){let f=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case Z.Text:{this.stateText(f);break}case Z.SpecialStartSequence:{this.stateSpecialStartSequence(f);break}case Z.InSpecialTag:{this.stateInSpecialTag(f);break}case Z.CDATASequence:{this.stateCDATASequence(f);break}case Z.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(f);break}case Z.InAttributeName:{this.stateInAttributeName(f);break}case Z.InCommentLike:{this.stateInCommentLike(f);break}case Z.InSpecialComment:{this.stateInSpecialComment(f);break}case Z.BeforeAttributeName:{this.stateBeforeAttributeName(f);break}case Z.InTagName:{this.stateInTagName(f);break}case Z.InClosingTagName:{this.stateInClosingTagName(f);break}case Z.BeforeTagName:{this.stateBeforeTagName(f);break}case Z.AfterAttributeName:{this.stateAfterAttributeName(f);break}case Z.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(f);break}case Z.BeforeAttributeValue:{this.stateBeforeAttributeValue(f);break}case Z.BeforeClosingTagName:{this.stateBeforeClosingTagName(f);break}case Z.AfterClosingTagName:{this.stateAfterClosingTagName(f);break}case Z.BeforeSpecialS:{this.stateBeforeSpecialS(f);break}case Z.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(f);break}case Z.InSelfClosingTag:{this.stateInSelfClosingTag(f);break}case Z.InDeclaration:{this.stateInDeclaration(f);break}case Z.BeforeDeclaration:{this.stateBeforeDeclaration(f);break}case Z.BeforeComment:{this.stateBeforeComment(f);break}case Z.InProcessingInstruction:{this.stateInProcessingInstruction(f);break}case Z.InNamedEntity:{this.stateInNamedEntity(f);break}case Z.BeforeEntity:{this.stateBeforeEntity(f);break}case Z.InHexEntity:{this.stateInHexEntity(f);break}case Z.InNumericEntity:{this.stateInNumericEntity(f);break}default:this.stateBeforeNumericEntity(f)}this.index++}this.cleanup()}finish(){if(this.state===Z.InNamedEntity)this.emitNamedEntity();if(this.sectionStart<this.index)this.handleTrailingData();this.cbs.onend()}handleTrailingData(){let f=this.buffer.length+this.offset;if(this.state===Z.InCommentLike)if(this.currentSequence===Sf.CdataEnd)this.cbs.oncdata(this.sectionStart,f,0);else this.cbs.oncomment(this.sectionStart,f,0);else if(this.state===Z.InNumericEntity&&this.allowLegacyEntity())this.emitNumericEntity(!1);else if(this.state===Z.InHexEntity&&this.allowLegacyEntity())this.emitNumericEntity(!1);else if(this.state===Z.InTagName||this.state===Z.BeforeAttributeName||this.state===Z.BeforeAttributeValue||this.state===Z.AfterAttributeName||this.state===Z.InAttributeName||this.state===Z.InAttributeValueSq||this.state===Z.InAttributeValueDq||this.state===Z.InAttributeValueNq||this.state===Z.InClosingTagName);else this.cbs.ontext(this.sectionStart,f)}emitPartial(f,R){if(this.baseState!==Z.Text&&this.baseState!==Z.InSpecialTag)this.cbs.onattribdata(f,R);else this.cbs.ontext(f,R)}emitCodePoint(f){if(this.baseState!==Z.Text&&this.baseState!==Z.InSpecialTag)this.cbs.onattribentity(f);else this.cbs.ontextentity(f)}}var A0=new Set(["input","option","optgroup","select","button","datalist","textarea"]),c=new Set(["p"]),oN=new Set(["thead","tbody"]),nN=new Set(["dd","dt"]),uN=new Set(["rt","rp"]),zM=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",c],["h1",c],["h2",c],["h3",c],["h4",c],["h5",c],["h6",c],["select",A0],["input",A0],["output",A0],["button",A0],["datalist",A0],["textarea",A0],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",nN],["dt",nN],["address",c],["article",c],["aside",c],["blockquote",c],["details",c],["div",c],["dl",c],["fieldset",c],["figcaption",c],["figure",c],["footer",c],["form",c],["header",c],["hr",c],["main",c],["nav",c],["ol",c],["pre",c],["section",c],["table",c],["ul",c],["rt",uN],["rp",uN],["tbody",oN],["tfoot",oN]]),QM=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),eN=new Set(["math","svg"]),tN=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),LM=/\s|\//;class o3{constructor(f,R={}){var h,$,G,A,W;this.options=R,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=f!==null&&f!==void 0?f:{},this.lowerCaseTagNames=(h=R.lowerCaseTags)!==null&&h!==void 0?h:!R.xmlMode,this.lowerCaseAttributeNames=($=R.lowerCaseAttributeNames)!==null&&$!==void 0?$:!R.xmlMode,this.tokenizer=new((G=R.Tokenizer)!==null&&G!==void 0?G:W$)(this.options,this),(W=(A=this.cbs).onparserinit)===null||W===void 0||W.call(A,this)}ontext(f,R){var h,$;let G=this.getSlice(f,R);this.endIndex=R-1,($=(h=this.cbs).ontext)===null||$===void 0||$.call(h,G),this.startIndex=R}ontextentity(f){var R,h;let $=this.tokenizer.getSectionStart();this.endIndex=$-1,(h=(R=this.cbs).ontext)===null||h===void 0||h.call(R,G0(f)),this.startIndex=$}isVoidElement(f){return!this.options.xmlMode&&QM.has(f)}onopentagname(f,R){this.endIndex=R;let h=this.getSlice(f,R);if(this.lowerCaseTagNames)h=h.toLowerCase();this.emitOpenTag(h)}emitOpenTag(f){var R,h,$,G;this.openTagStart=this.startIndex,this.tagname=f;let A=!this.options.xmlMode&&zM.get(f);if(A)while(this.stack.length>0&&A.has(this.stack[this.stack.length-1])){let W=this.stack.pop();(h=(R=this.cbs).onclosetag)===null||h===void 0||h.call(R,W,!0)}if(!this.isVoidElement(f)){if(this.stack.push(f),eN.has(f))this.foreignContext.push(!0);else if(tN.has(f))this.foreignContext.push(!1)}if((G=($=this.cbs).onopentagname)===null||G===void 0||G.call($,f),this.cbs.onopentag)this.attribs={}}endOpenTag(f){var R,h;if(this.startIndex=this.openTagStart,this.attribs)(h=(R=this.cbs).onopentag)===null||h===void 0||h.call(R,this.tagname,this.attribs,f),this.attribs=null;if(this.cbs.onclosetag&&this.isVoidElement(this.tagname))this.cbs.onclosetag(this.tagname,!0);this.tagname=""}onopentagend(f){this.endIndex=f,this.endOpenTag(!1),this.startIndex=f+1}onclosetag(f,R){var h,$,G,A,W,F;this.endIndex=R;let N=this.getSlice(f,R);if(this.lowerCaseTagNames)N=N.toLowerCase();if(eN.has(N)||tN.has(N))this.foreignContext.pop();if(!this.isVoidElement(N)){let U=this.stack.lastIndexOf(N);if(U!==-1)if(this.cbs.onclosetag){let J=this.stack.length-U;while(J--)this.cbs.onclosetag(this.stack.pop(),J!==0)}else this.stack.length=U;else if(!this.options.xmlMode&&N==="p")this.emitOpenTag("p"),this.closeCurrentTag(!0)}else if(!this.options.xmlMode&&N==="br")($=(h=this.cbs).onopentagname)===null||$===void 0||$.call(h,"br"),(A=(G=this.cbs).onopentag)===null||A===void 0||A.call(G,"br",{},!0),(F=(W=this.cbs).onclosetag)===null||F===void 0||F.call(W,"br",!1);this.startIndex=R+1}onselfclosingtag(f){if(this.endIndex=f,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1])this.closeCurrentTag(!1),this.startIndex=f+1;else this.onopentagend(f)}closeCurrentTag(f){var R,h;let $=this.tagname;if(this.endOpenTag(f),this.stack[this.stack.length-1]===$)(h=(R=this.cbs).onclosetag)===null||h===void 0||h.call(R,$,!f),this.stack.pop()}onattribname(f,R){this.startIndex=f;let h=this.getSlice(f,R);this.attribname=this.lowerCaseAttributeNames?h.toLowerCase():h}onattribdata(f,R){this.attribvalue+=this.getSlice(f,R)}onattribentity(f){this.attribvalue+=G0(f)}onattribend(f,R){var h,$;if(this.endIndex=R,($=(h=this.cbs).onattribute)===null||$===void 0||$.call(h,this.attribname,this.attribvalue,f===Tf.Double?'"':f===Tf.Single?"'":f===Tf.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname))this.attribs[this.attribname]=this.attribvalue;this.attribvalue=""}getInstructionName(f){let R=f.search(LM),h=R<0?f:f.substr(0,R);if(this.lowerCaseTagNames)h=h.toLowerCase();return h}ondeclaration(f,R){this.endIndex=R;let h=this.getSlice(f,R);if(this.cbs.onprocessinginstruction){let $=this.getInstructionName(h);this.cbs.onprocessinginstruction(`!${$}`,`!${h}`)}this.startIndex=R+1}onprocessinginstruction(f,R){this.endIndex=R;let h=this.getSlice(f,R);if(this.cbs.onprocessinginstruction){let $=this.getInstructionName(h);this.cbs.onprocessinginstruction(`?${$}`,`?${h}`)}this.startIndex=R+1}oncomment(f,R,h){var $,G,A,W;this.endIndex=R,(G=($=this.cbs).oncomment)===null||G===void 0||G.call($,this.getSlice(f,R-h)),(W=(A=this.cbs).oncommentend)===null||W===void 0||W.call(A),this.startIndex=R+1}oncdata(f,R,h){var $,G,A,W,F,N,U,J,X,z;this.endIndex=R;let S=this.getSlice(f,R-h);if(this.options.xmlMode||this.options.recognizeCDATA)(G=($=this.cbs).oncdatastart)===null||G===void 0||G.call($),(W=(A=this.cbs).ontext)===null||W===void 0||W.call(A,S),(N=(F=this.cbs).oncdataend)===null||N===void 0||N.call(F);else(J=(U=this.cbs).oncomment)===null||J===void 0||J.call(U,`[CDATA[${S}]]`),(z=(X=this.cbs).oncommentend)===null||z===void 0||z.call(X);this.startIndex=R+1}onend(){var f,R;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let h=this.stack.length;h>0;this.cbs.onclosetag(this.stack[--h],!0));}(R=(f=this.cbs).onend)===null||R===void 0||R.call(f)}reset(){var f,R,h,$;(R=(f=this.cbs).onreset)===null||R===void 0||R.call(f),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,($=(h=this.cbs).onparserinit)===null||$===void 0||$.call(h,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(f){this.reset(),this.end(f)}getSlice(f,R){while(f-this.bufferOffset>=this.buffers[0].length)this.shiftBuffer();let h=this.buffers[0].slice(f-this.bufferOffset,R-this.bufferOffset);while(R-this.bufferOffset>this.buffers[0].length)this.shiftBuffer(),h+=this.buffers[0].slice(0,R-this.bufferOffset);return h}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(f){var R,h;if(this.ended){(h=(R=this.cbs).onerror)===null||h===void 0||h.call(R,Error(".write() after done!"));return}if(this.buffers.push(f),this.tokenizer.running)this.tokenizer.write(f),this.writeIndex++}end(f){var R,h;if(this.ended){(h=(R=this.cbs).onerror)===null||h===void 0||h.call(R,Error(".end() after done!"));return}if(f)this.write(f);this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){this.tokenizer.resume();while(this.tokenizer.running&&this.writeIndex<this.buffers.length)this.tokenizer.write(this.buffers[this.writeIndex++]);if(this.ended)this.tokenizer.end()}parseChunk(f){this.write(f)}done(f){this.end(f)}}var fU=/["&'<>$\x80-\uFFFF]/g,RU=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),IM=String.prototype.codePointAt!=null?(f,R)=>f.codePointAt(R):(f,R)=>(f.charCodeAt(R)&64512)===55296?(f.charCodeAt(R)-55296)*1024+f.charCodeAt(R+1)-56320+65536:f.charCodeAt(R);function F$(f){let R="",h=0,$;while(($=fU.exec(f))!==null){let G=$.index,A=f.charCodeAt(G),W=RU.get(A);if(W!==void 0)R+=f.substring(h,G)+W,h=G+1;else R+=`${f.substring(h,G)}&#x${IM(f,G).toString(16)};`,h=fU.lastIndex+=Number((A&64512)===55296)}return R+f.substr(h)}function n3(f,R){return function($){let G,A=0,W="";while(G=f.exec($)){if(A!==G.index)W+=$.substring(A,G.index);W+=R.get(G[0].charCodeAt(0)),A=G.index+1}return W+$.substring(A)}}var wM=n3(/[&<>'"]/g,RU),u3=n3(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),e3=n3(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]));var hU;(function(f){f[f.XML=0]="XML",f[f.HTML=1]="HTML"})(hU||(hU={}));var $U;(function(f){f[f.UTF8=0]="UTF8",f[f.ASCII=1]="ASCII",f[f.Extensive=2]="Extensive",f[f.Attribute=3]="Attribute",f[f.Text=4]="Text"})($U||($U={}));var GU=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((f)=>[f.toLowerCase(),f])),AU=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((f)=>[f.toLowerCase(),f]));var qM=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function PM(f){return f.replace(/"/g,"&quot;")}function BM(f,R){var h;if(!f)return;let $=((h=R.encodeEntities)!==null&&h!==void 0?h:R.decodeEntities)===!1?PM:R.xmlMode||R.encodeEntities!=="utf8"?F$:u3;return Object.keys(f).map((G)=>{var A,W;let F=(A=f[G])!==null&&A!==void 0?A:"";if(R.xmlMode==="foreign")G=(W=AU.get(G))!==null&&W!==void 0?W:G;if(!R.emptyAttrs&&!R.xmlMode&&F==="")return G;return`${G}="${$(F)}"`}).join(" ")}var WU=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function f1(f,R={}){let h="length"in f?f:[f],$="";for(let G=0;G<h.length;G++)$+=KM(h[G],R);return $}function KM(f,R){switch(f.type){case ZN:return f1(f.children,R);case LN:case MN:return OM(f);case XN:return TM(f);case QN:return EM(f);case SN:case DN:case zN:return yM(f,R);case JN:return VM(f,R)}}var vM=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),jM=new Set(["svg","math"]);function yM(f,R){var h;if(R.xmlMode==="foreign"){if(f.name=(h=GU.get(f.name))!==null&&h!==void 0?h:f.name,f.parent&&vM.has(f.parent.name))R={...R,xmlMode:!1}}if(!R.xmlMode&&jM.has(f.name))R={...R,xmlMode:"foreign"};let $=`<${f.name}`,G=BM(f.attribs,R);if(G)$+=` ${G}`;if(f.children.length===0&&(R.xmlMode?R.selfClosingTags!==!1:R.selfClosingTags&&WU.has(f.name))){if(!R.xmlMode)$+=" ";$+="/>"}else{if($+=">",f.children.length>0)$+=f1(f.children,R);if(R.xmlMode||!WU.has(f.name))$+=`</${f.name}>`}return $}function OM(f){return`<${f.data}>`}function VM(f,R){var h;let $=f.data||"";if(((h=R.encodeEntities)!==null&&h!==void 0?h:R.decodeEntities)!==!1&&!(!R.xmlMode&&f.parent&&qM.has(f.parent.name)))$=R.xmlMode||R.encodeEntities!=="utf8"?F$($):e3($);return $}function EM(f){return`<![CDATA[${f.children[0].data}]]>`}function TM(f){return`<!--${f.data}-->`}function FU(f,R){let h=new O3(void 0,R);return new o3(h,R).end(f),h.root}var AG=M(YU(),1);function WG(f,R,h=()=>{return}){if(f===void 0){let $=function(...G){return R($,...G)};return $}if(f>=0)return function(...$){return R(WG(f-1,R,h),...$)};return h}function SU(f,R){let h=0,$=f.length;while(h<$&&f[h]===R)++h;while($>h&&f[$-1]===R)--$;return h>0||$<f.length?f.substring(h,$):f}function rM(f,R){let h=f.length;while(h>0&&f[h-1]===R)--h;return h<f.length?f.substring(0,h):f}function pM(f){return f.replace(/[\s\S]/g,(R)=>"\\u"+R.charCodeAt().toString(16).padStart(4,"0"))}function DU(f,R){let h=new Map;for(let $=f.length;$-- >0;){let G=f[$],A=R(G);h.set(A,h.has(A)?AG.default(G,h.get(A),{arrayMerge:oM}):G)}return[...h.values()].reverse()}var oM=(f,R,h)=>[...R];function F0(f,R){for(let h of R){if(!f)return;f=f[h]}return f}function ZU(f,R="a",h=26){let $=[];do f-=1,$.push(f%h),f=f/h>>0;while(f>0);let G=R.charCodeAt(0);return $.reverse().map((A)=>String.fromCharCode(G+A)).join("")}var t3=["I","X","C","M"],JU=["V","L","D"];function MU(f){return[...f+""].map((R)=>+R).reverse().map((R,h)=>R%5<4?(R<5?"":JU[h])+t3[h].repeat(R%5):t3[h]+(R<5?JU[h]:t3[h+1])).reverse().join("")}class FG{constructor(f,R=void 0){this.lines=[],this.nextLineWords=[],this.maxLineLength=R||f.wordwrap||Number.MAX_VALUE,this.nextLineAvailableChars=this.maxLineLength,this.wrapCharacters=F0(f,["longWordSplit","wrapCharacters"])||[],this.forceWrapOnLimit=F0(f,["longWordSplit","forceWrapOnLimit"])||!1,this.stashedSpace=!1,this.wordBreakOpportunity=!1}pushWord(f,R=!1){if(this.nextLineAvailableChars<=0&&!R)this.startNewLine();let h=this.nextLineWords.length===0,$=f.length+(h?0:1);if($<=this.nextLineAvailableChars||R)this.nextLineWords.push(f),this.nextLineAvailableChars-=$;else{let[G,...A]=this.splitLongWord(f);if(!h)this.startNewLine();this.nextLineWords.push(G),this.nextLineAvailableChars-=G.length;for(let W of A)this.startNewLine(),this.nextLineWords.push(W),this.nextLineAvailableChars-=W.length}}popWord(){let f=this.nextLineWords.pop();if(f!==void 0){let R=this.nextLineWords.length===0,h=f.length+(R?0:1);this.nextLineAvailableChars+=h}return f}concatWord(f,R=!1){if(this.wordBreakOpportunity&&f.length>this.nextLineAvailableChars)this.pushWord(f,R),this.wordBreakOpportunity=!1;else{let h=this.popWord();this.pushWord(h?h.concat(f):f,R)}}startNewLine(f=1){if(this.lines.push(this.nextLineWords),f>1)this.lines.push(...Array.from({length:f-1},()=>[]));this.nextLineWords=[],this.nextLineAvailableChars=this.maxLineLength}isEmpty(){return this.lines.length===0&&this.nextLineWords.length===0}clear(){this.lines.length=0,this.nextLineWords.length=0,this.nextLineAvailableChars=this.maxLineLength}toString(){return[...this.lines,this.nextLineWords].map((f)=>f.join(" ")).join(`
@@ -70,12 +70,12 @@ ${"".padEnd(R)}${"^".repeat(h)}`}function bN(f){return s5(b3,f)}function Ef(f){i
70
70
  `).map((A)=>"> "+A).join(`
71
71
  `)})}function GG(f,R){if(!R)return f;let h=typeof R[0]==="string"?R[0]:"[",$=typeof R[1]==="string"?R[1]:"]";return h+f+$}function PU(f,R,h,$,G){let A=typeof R==="function"?R(f,$,G):f;return A[0]==="/"&&h?rM(h,"/")+A:A}function PX(f,R,h,$){let G=f.attribs||{},A=G.alt?G.alt:"",W=!G.src?"":PU(G.src,$.pathRewrite,$.baseUrl,h.metadata,f),F=!W?A:!A?GG(W,$.linkBrackets):A+" "+GG(W,$.linkBrackets);h.addInline(F,{noWordTransform:!0})}function BX(f,R,h,$){function G(){if($.ignoreHref)return"";if(!f.attribs||!f.attribs.href)return"";let W=f.attribs.href.replace(/^mailto:/,"");if($.noAnchorUrl&&W[0]==="#")return"";return W=PU(W,$.pathRewrite,$.baseUrl,h.metadata,f),W}let A=G();if(!A)R(f.children,h);else{let W="";if(h.pushWordTransform((N)=>{if(N)W+=N;return N}),R(f.children,h),h.popWordTransform(),!($.hideLinkHrefIfSameAsText&&A===W))h.addInline(!W?A:" "+GG(A,$.linkBrackets),{noWordTransform:!0})}}function BU(f,R,h,$,G){let A=F0(f,["parent","name"])==="li",W=0,F=(f.children||[]).filter((N)=>N.type!=="text"||!/^\s*$/.test(N.data)).map(function(N){if(N.name!=="li")return{node:N,prefix:""};let U=A?G().trimStart():G();if(U.length>W)W=U.length;return{node:N,prefix:U}});if(!F.length)return;h.openList({interRowLineBreaks:1,leadingLineBreaks:A?1:$.leadingLineBreaks||2,maxPrefixLength:W,prefixAlign:"left"});for(let{node:N,prefix:U}of F)h.openListItem({prefix:U}),R([N],h),h.closeListItem();h.closeList({trailingLineBreaks:A?1:$.trailingLineBreaks||2})}function KX(f,R,h,$){let G=$.itemPrefix||" * ";return BU(f,R,h,$,()=>G)}function vX(f,R,h,$){let G=Number(f.attribs.start||"1"),A=jX(f.attribs.type);return BU(f,R,h,$,()=>" "+A(G++)+". ")}function jX(f="1"){switch(f){case"a":return(R)=>ZU(R,"a");case"A":return(R)=>ZU(R,"A");case"i":return(R)=>MU(R).toLowerCase();case"I":return(R)=>MU(R);case"1":default:return(R)=>R.toString()}}function yX(f){let R=[],h=[];for(let $ of f)if($.startsWith("."))R.push($.substring(1));else if($.startsWith("#"))h.push($.substring(1));return{classes:R,ids:h}}function OX(f,R){if(R===!0)return!0;if(!f)return!1;let{classes:h,ids:$}=yX(R),G=(f.class||"").split(" "),A=(f.id||"").split(" ");return G.some((W)=>h.includes(W))||A.some((W)=>$.includes(W))}function VX(f,R,h,$){return OX(f.attribs,h.options.tables)?KU(f,R,h,$):EX(f,R,h,$)}function EX(f,R,h,$){h.openBlock({leadingLineBreaks:$.leadingLineBreaks}),R(f.children,h),h.closeBlock({trailingLineBreaks:$.trailingLineBreaks})}function KU(f,R,h,$){h.openTable(),f.children.forEach(A),h.closeTable({tableToString:(W)=>SX(W,$.rowSpacing??0,$.colSpacing??3),leadingLineBreaks:$.leadingLineBreaks,trailingLineBreaks:$.trailingLineBreaks});function G(W){let F=+F0(W,["attribs","colspan"])||1,N=+F0(W,["attribs","rowspan"])||1;h.openTableCell({maxColumnWidth:$.maxColumnWidth}),R(W.children,h),h.closeTableCell({colspan:F,rowspan:N})}function A(W){if(W.type!=="tag")return;let F=$.uppercaseHeaderCells!==!1?(N)=>{h.pushWordTransform((U)=>U.toUpperCase()),G(N),h.popWordTransform()}:G;switch(W.name){case"thead":case"tbody":case"tfoot":case"center":W.children.forEach(A);return;case"tr":{h.openTableRow();for(let N of W.children){if(N.type!=="tag")continue;switch(N.name){case"th":{F(N);break}case"td":{G(N);break}}}h.closeTableRow();break}}}}var TX=Object.freeze({__proto__:null,anchor:BX,blockquote:qX,dataTable:KU,heading:wX,horizontalLine:QX,image:PX,lineBreak:DX,orderedList:vX,paragraph:LX,pre:IX,table:VX,unorderedList:KX,wbr:zX}),gX={baseElements:{selectors:["body"],orderBy:"selectors",returnDomByDefault:!0},decodeEntities:!0,encodeCharacters:{},formatters:{},limits:{ellipsis:"...",maxBaseElements:void 0,maxChildNodes:void 0,maxDepth:void 0,maxInputLength:16777216},longWordSplit:{forceWrapOnLimit:!1,wrapCharacters:[]},preserveNewlines:!1,selectors:[{selector:"*",format:"inline"},{selector:"a",format:"anchor",options:{baseUrl:null,hideLinkHrefIfSameAsText:!1,ignoreHref:!1,linkBrackets:["[","]"],noAnchorUrl:!0}},{selector:"article",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"aside",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"blockquote",format:"blockquote",options:{leadingLineBreaks:2,trailingLineBreaks:2,trimEmptyLines:!0}},{selector:"br",format:"lineBreak"},{selector:"div",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"footer",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"form",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"h1",format:"heading",options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:"h2",format:"heading",options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:"h3",format:"heading",options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:"h4",format:"heading",options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:"h5",format:"heading",options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:"h6",format:"heading",options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:"header",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"hr",format:"horizontalLine",options:{leadingLineBreaks:2,length:void 0,trailingLineBreaks:2}},{selector:"img",format:"image",options:{baseUrl:null,linkBrackets:["[","]"]}},{selector:"main",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"nav",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"ol",format:"orderedList",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"p",format:"paragraph",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"pre",format:"pre",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"section",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"table",format:"table",options:{colSpacing:3,leadingLineBreaks:2,maxColumnWidth:60,rowSpacing:0,trailingLineBreaks:2,uppercaseHeaderCells:!0}},{selector:"ul",format:"unorderedList",options:{itemPrefix:" * ",leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"wbr",format:"wbr"}],tables:[],whitespaceCharacters:` \r
72
72
  \f\u200B`,wordwrap:80},CX=(f,R,h)=>[...f,...R],vU=(f,R,h)=>[...R],mX=(f,R,h)=>f.some(($)=>typeof $==="object")?CX(f,R):vU(f,R);function cX(f={}){return f=AG.default(gX,f,{arrayMerge:vU,customMerge:(R)=>R==="selectors"?mX:void 0}),f.formatters=Object.assign({},ZX,TX,f.formatters),f.selectors=DU(f.selectors,(R)=>R.selector),bX(f),uM(f)}function NG(f,R={},h=void 0){return cX(R)(f,h)}function bX(f){if(f.tags){let h=Object.entries(f.tags).map(([$,G])=>({...G,selector:$||"*"}));f.selectors.push(...h),f.selectors=DU(f.selectors,($)=>$.selector)}function R(h,$,G){let A=$.pop();for(let W of $){let F=h[W];if(!F)F={},h[W]=F;h=F}h[A]=G}if(f.baseElement){let h=f.baseElement;R(f,["baseElements","selectors"],Array.isArray(h)?h:[h])}if(f.returnDomByDefault!==void 0)R(f,["baseElements","returnDomByDefault"],f.returnDomByDefault);for(let h of f.selectors)if(h.format==="anchor"&&F0(h,["options","noLinkBrackets"]))R(h,["options","linkBrackets"],!1)}var CH=M(OH(),1);import{Writable as r9}from"stream";var{defineProperty:k9,getOwnPropertySymbols:VH}=Object,l9=Object.prototype.hasOwnProperty,s9=Object.prototype.propertyIsEnumerable,EH=(f,R,h)=>(R in f)?k9(f,R,{enumerable:!0,configurable:!0,writable:!0,value:h}):f[R]=h,VG=(f,R)=>{for(var h in R||(R={}))if(l9.call(R,h))EH(f,h,R[h]);if(VH){for(var h of VH(R))if(s9.call(R,h))EH(f,h,R[h])}return f},EG=(f,R,h)=>{return new Promise(($,G)=>{var A=(N)=>{try{F(h.next(N))}catch(U){G(U)}},W=(N)=>{try{F(h.throw(N))}catch(U){G(U)}},F=(N)=>N.done?$(N.value):Promise.resolve(N.value).then(A,W);F((h=h.apply(f,R)).next())})},d9={unformatted:["code","pre","em","strong","span"],indent_inner_html:!0,indent_char:" ",indent_size:2,sep:`
73
- `},a9=(f,R={})=>{return CH.default.html(f,VG(VG({},d9),R))},i9=[{selector:"img",format:"skip"},{selector:"#__react-email-preview",format:"skip"},{selector:"a",options:{linkBrackets:!1}}];var TH=new TextDecoder("utf-8"),gH=(f)=>EG(void 0,null,function*(){let R="";if("pipeTo"in f){let h=new WritableStream({write($){R+=TH.decode($)}});yield f.pipeTo(h)}else{let h=new r9({write($,G,A){R+=TH.decode($),A()}});return f.pipe(h),new Promise(($,G)=>{h.on("error",G),h.on("close",()=>{$(R)})})}return R}),L$=(f,R)=>EG(void 0,null,function*(){let{default:h}=yield import("react-dom/server"),$;if(Object.hasOwn(h,"renderToReadableStream"))$=yield gH(yield h.renderToReadableStream(f));else yield new Promise((W,F)=>{let N=h.renderToPipeableStream(f,{onAllReady(){return EG(this,null,function*(){$=yield gH(N),W()})},onError(U){F(U)}})});if(R==null?void 0:R.plainText)return NG($,VG({selectors:i9},R.htmlToTextOptions));let A=`${'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'}${$.replace(/<!DOCTYPE.*?>/,"")}`;if(R==null?void 0:R.pretty)return a9(A);return A});var{defineProperty:p9,defineProperties:o9,getOwnPropertyDescriptors:n9,getOwnPropertySymbols:mH}=Object,u9=Object.prototype.hasOwnProperty,e9=Object.prototype.propertyIsEnumerable,cH=(f,R,h)=>(R in f)?p9(f,R,{enumerable:!0,configurable:!0,writable:!0,value:h}):f[R]=h,J1=(f,R)=>{for(var h in R||(R={}))if(u9.call(R,h))cH(f,h,R[h]);if(mH){for(var h of mH(R))if(e9.call(R,h))cH(f,h,R[h])}return f},t9=(f,R)=>o9(f,n9(R)),m=(f,R,h)=>{return new Promise(($,G)=>{var A=(N)=>{try{F(h.next(N))}catch(U){G(U)}},W=(N)=>{try{F(h.throw(N))}catch(U){G(U)}},F=(N)=>N.done?$(N.value):Promise.resolve(N.value).then(A,W);F((h=h.apply(f,R)).next())})},fD="3.5.0",RD=class{constructor(f){this.resend=f}create(f){return m(this,arguments,function*(R,h={}){return yield this.resend.post("/api-keys",R,h)})}list(){return m(this,null,function*(){return yield this.resend.get("/api-keys")})}remove(f){return m(this,null,function*(){return yield this.resend.delete(`/api-keys/${f}`)})}},hD=class{constructor(f){this.resend=f}create(f){return m(this,arguments,function*(R,h={}){return yield this.resend.post("/audiences",R,h)})}list(){return m(this,null,function*(){return yield this.resend.get("/audiences")})}get(f){return m(this,null,function*(){return yield this.resend.get(`/audiences/${f}`)})}remove(f){return m(this,null,function*(){return yield this.resend.delete(`/audiences/${f}`)})}},$D=class{constructor(f){this.resend=f}send(f){return m(this,arguments,function*(R,h={}){return this.create(R,h)})}create(f){return m(this,arguments,function*(R,h={}){for(let G of R)if(G.react)G.html=yield L$(G.react),delete G.react;return yield this.resend.post("/emails/batch",R,h)})}},GD=class{constructor(f){this.resend=f}create(f){return m(this,arguments,function*(R,h={}){return yield this.resend.post(`/audiences/${R.audienceId}/contacts`,{unsubscribed:R.unsubscribed,email:R.email,first_name:R.firstName,last_name:R.lastName},h)})}list(f){return m(this,null,function*(){return yield this.resend.get(`/audiences/${f.audienceId}/contacts`)})}get(f){return m(this,null,function*(){return yield this.resend.get(`/audiences/${f.audienceId}/contacts/${f.id}`)})}update(f){return m(this,null,function*(){return yield this.resend.patch(`/audiences/${f.audienceId}/contacts/${f.id}`,{unsubscribed:f.unsubscribed,first_name:f.firstName,last_name:f.lastName})})}remove(f){return m(this,null,function*(){return yield this.resend.delete(`/audiences/${f.audienceId}/contacts/${(f==null?void 0:f.email)?f==null?void 0:f.email:f==null?void 0:f.id}`)})}},AD=class{constructor(f){this.resend=f}create(f){return m(this,arguments,function*(R,h={}){return yield this.resend.post("/domains",R,h)})}list(){return m(this,null,function*(){return yield this.resend.get("/domains")})}get(f){return m(this,null,function*(){return yield this.resend.get(`/domains/${f}`)})}update(f){return m(this,null,function*(){return yield this.resend.patch(`/domains/${f.id}`,{click_tracking:f.clickTracking,open_tracking:f.openTracking,tls:f.tls})})}remove(f){return m(this,null,function*(){return yield this.resend.delete(`/domains/${f}`)})}verify(f){return m(this,null,function*(){return yield this.resend.post(`/domains/${f}/verify`)})}},WD=class{constructor(f){this.resend=f}send(f){return m(this,arguments,function*(R,h={}){return this.create(R,h)})}create(f){return m(this,arguments,function*(R,h={}){if(R.react)R.html=yield L$(R.react),delete R.react;return yield this.resend.post("/emails",R,h)})}get(f){return m(this,null,function*(){return yield this.resend.get(`/emails/${f}`)})}},bH="https://api.resend.com",xH=`resend-node:${fD}`,FD=typeof process<"u"&&process.env?process.env.RESEND_BASE_URL||bH:bH,ND=typeof process<"u"&&process.env?process.env.RESEND_USER_AGENT||xH:xH,kH=class{constructor(f){if(this.key=f,this.apiKeys=new RD(this),this.audiences=new hD(this),this.batch=new $D(this),this.contacts=new GD(this),this.domains=new AD(this),this.emails=new WD(this),!f){if(typeof process<"u"&&process.env)this.key=process.env.RESEND_API_KEY;if(!this.key)throw Error('Missing API key. Pass it to the constructor `new Resend("re_123")`')}this.headers=new Headers({Authorization:`Bearer ${this.key}`,"User-Agent":ND,"Content-Type":"application/json"})}fetchRequest(f){return m(this,arguments,function*(R,h={}){try{let $=yield fetch(`${FD}${R}`,h);if(!$.ok)try{let A=yield $.text();return{data:null,error:JSON.parse(A)}}catch(A){if(A instanceof SyntaxError)return{data:null,error:{name:"application_error",message:"Internal server error. We are unable to process your request right now, please try again later."}};let W={message:$.statusText,name:"application_error"};if(A instanceof Error)return{data:null,error:t9(J1({},W),{message:A.message})};return{data:null,error:W}}return{data:yield $.json(),error:null}}catch($){return{data:null,error:{name:"application_error",message:"Unable to fetch data. The request could not be resolved."}}}})}post(f,R){return m(this,arguments,function*(h,$,G={}){let A=J1({method:"POST",headers:this.headers,body:JSON.stringify($)},G);return this.fetchRequest(h,A)})}get(f){return m(this,arguments,function*(R,h={}){let $=J1({method:"GET",headers:this.headers},h);return this.fetchRequest(R,$)})}put(f,R){return m(this,arguments,function*(h,$,G={}){let A=J1({method:"PUT",headers:this.headers,body:JSON.stringify($)},G);return this.fetchRequest(h,A)})}patch(f,R){return m(this,arguments,function*(h,$,G={}){let A=J1({method:"PATCH",headers:this.headers,body:JSON.stringify($)},G);return this.fetchRequest(h,A)})}delete(f,R){return m(this,null,function*(){let h={method:"DELETE",headers:this.headers,body:JSON.stringify(R)};return this.fetchRequest(f,h)})}};class I${}class w$ extends I${apiKey;constructor(f=process.env.RESEND_API_KEY){super();this.apiKey=f}async send(f){let R=new kH(this.apiKey),{data:h,error:$}=await R.emails.send({...f});if($)return console.error($),!1;if(h)return!0;return!1}}class lH extends r{driver=new w$;headers={};boot(){}filterRecipients(f){return f}}class sH extends r{channels={};boot(){}}class _H extends r{root;rootRouter;boot(){}onRequestStart(f){}onRequestEnd(f){}onRequestFail(f,R){}}class dH extends r{rootRouter;boot(){}onRequestStart(f){}onRequestEnd(f){}onRequestFail(f,R){}}class aH extends r{maxFileSize=10485760;boot(){}onLogFileClosed(f){}onLogCreated(f){}}class iH extends r{jobs=[];concurrency=1;boot(){}}class pH{static name="unset";worker=!1;maxAttempts=3;run(...f){}onFail(f,...R){}onSuccess(f,...R){}onDeadletter(f,...R){}static dispatch(...f){if(this.name==="unset")throw Error("Cannot dispatch a job with no name");rH.use().push(this,JSON.stringify(f))}}import UD from"sharp";class q${}class P$ extends q${async resize(f,R){let{height:h,width:$,quality:G,fit:A}=R;return await UD(f).resize($>0?$:void 0,h>0?h:void 0,{fit:A}).webp({quality:G>0?G:80,force:!0}).toBuffer()}}class oH extends r{driver=new P$;boot(){}}class U0{}var HD={clientId:process.env.GOOGLE_CLIENT_ID,clientSecret:process.env.GOOGLE_CLIENT_SECRET,redirectPath:"/oauth/google/callback",scope:"https://www.googleapis.com/auth/userinfo.email"};class nH extends U0{config;constructor(f={}){super();this.config={...HD,...f}}getRedirectUrl(){let f=this.config.scope,R=this.config.clientId,h=new URL("https://accounts.google.com/o/oauth2/v2/auth"),$={scope:f,include_granted_scopes:"true",response_type:"code",state:"state_parameter_passthrough_value",redirect_uri:`${process.env.HOST_NAME}/oauth/google/callback`,client_id:R};for(let[A,W]of Object.entries($))h.searchParams.append(A,W);let G=h.toString();return B$.to(G),G}async onCallback(f){let R=new URL("https://oauth2.googleapis.com/token");R.searchParams.append("code",f.search.get("code")),R.searchParams.append("client_id",this.config.clientId),R.searchParams.append("client_secret",this.config.clientSecret),R.searchParams.append("grant_type","authorization_code"),R.searchParams.append("redirect_uri",`${process.env.HOST_NAME}${this.config.redirectPath}`);let h=await fetch(R.toString(),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"}}),{access_token:$}=await h.json(),A=await(await fetch(`https://www.googleapis.com/oauth2/v3/userinfo?access_token=${$}`)).json();return{name:A.name,email:A.email}}}var YR="https://api.x.com/2/",H0="https://api.x.com/labs/2/",ZR="https://api.x.com/1.1/",pf="https://upload.x.com/1.1/",uH="https://stream.x.com/1.1/",Y0="https://ads-api.x.com/12/",Z0="https://ads-api-sandbox.twitter.com/12/";class TG{constructor({realData:f,rateLimit:R,instance:h,queryParams:$,sharedParams:G}){this._maxResultsWhenFetchLast=100,this._realData=f,this._rateLimit=R,this._instance=h,this._queryParams=$,this._sharedParams=G}get _isRateLimitOk(){if(!this._rateLimit)return!0;if(this._rateLimit.reset*1000<Date.now())return!0;return this._rateLimit.remaining>0}makeRequest(f){return this._instance.get(this.getEndpoint(),f,{fullResponse:!0,params:this._sharedParams})}makeNewInstanceFromResult(f,R){return new this.constructor({realData:f.data,rateLimit:f.rateLimit,instance:this._instance,queryParams:R,sharedParams:this._sharedParams})}getEndpoint(){return this._endpoint}injectQueryParams(f){return{...f?{max_results:f}:{},...this._queryParams}}async next(f){let R=this.getNextQueryParams(f),h=await this.makeRequest(R);return this.makeNewInstanceFromResult(h,R)}async fetchNext(f){let R=this.getNextQueryParams(f),h=await this.makeRequest(R);return await this.refreshInstanceFromResult(h,!0),this}async fetchLast(f=1/0){let R=this.getNextQueryParams(this._maxResultsWhenFetchLast),h=0;while(h<f&&this._isRateLimitOk){let $=await this.makeRequest(R);if(await this.refreshInstanceFromResult($,!0),h+=this.getPageLengthFromRequest($),this.isFetchLastOver($))break;R=this.getNextQueryParams(this._maxResultsWhenFetchLast)}return this}get rateLimit(){var f;return{...(f=this._rateLimit)!==null&&f!==void 0?f:{}}}get data(){return this._realData}get done(){return!this.canFetchNextPage(this._realData)}*[Symbol.iterator](){yield*this.getItemArray()}async*[Symbol.asyncIterator](){yield*this.getItemArray();let f=this,R=this.canFetchNextPage(this._realData);while(R&&this._isRateLimitOk&&f.getItemArray().length>0){let h=await f.next(this._maxResultsWhenFetchLast);this.refreshInstanceFromResult({data:h._realData,headers:{},rateLimit:h._rateLimit},!0),R=this.canFetchNextPage(h._realData),yield*h.getItemArray(),f=h}}async*fetchAndIterate(){for(let h of this.getItemArray())yield[h,this];let f=this,R=this.canFetchNextPage(this._realData);while(R&&this._isRateLimitOk&&f.getItemArray().length>0){let h=await f.next(this._maxResultsWhenFetchLast);this.refreshInstanceFromResult({data:h._realData,headers:{},rateLimit:h._rateLimit},!0),R=this.canFetchNextPage(h._realData);for(let $ of h.getItemArray())yield[$,h];this._rateLimit=h._rateLimit,f=h}}}class gG extends TG{async previous(f){let R=this.getPreviousQueryParams(f),h=await this.makeRequest(R);return this.makeNewInstanceFromResult(h,R)}async fetchPrevious(f){let R=this.getPreviousQueryParams(f),h=await this.makeRequest(R);return await this.refreshInstanceFromResult(h,!1),this}}var J0=TG;class Ff extends J0{getNextQueryParams(f){var R;return{...this._queryParams,cursor:(R=this._realData.next_cursor_str)!==null&&R!==void 0?R:this._realData.next_cursor,...f?{count:f}:{}}}isFetchLastOver(f){return!this.canFetchNextPage(f.data)}canFetchNextPage(f){return!this.isNextCursorInvalid(f.next_cursor)||!this.isNextCursorInvalid(f.next_cursor_str)}isNextCursorInvalid(f){return f===void 0||f===0||f===-1||f==="0"||f==="-1"}}class CG extends Ff{constructor(){super(...arguments);this._endpoint="direct_messages/events/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.events.push(...h.events),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.events.length}getItemArray(){return this.events}get events(){return this._realData.events}}class mG extends Ff{constructor(){super(...arguments);this._endpoint="direct_messages/welcome_messages/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.welcome_messages.push(...h.welcome_messages),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.welcome_messages.length}getItemArray(){return this.welcomeMessages}get welcomeMessages(){return this._realData.welcome_messages}}var d;(function(f){f.Jpeg="image/jpeg",f.Mp4="video/mp4",f.Mov="video/quicktime",f.Gif="image/gif",f.Png="image/png",f.Srt="text/plain",f.Webp="image/webp"})(d||(d={}));var JR;(function(f){f.Create="message_create",f.WelcomeCreate="welcome_message"})(JR||(JR={}));var M1;(function(f){f.Request="request",f.PartialResponse="partial-response",f.Response="response"})(M1||(M1={}));class K$ extends Error{constructor(){super(...arguments);this.error=!0}}class X1 extends K${constructor(f,R){super(f);this.type=M1.Request,Error.captureStackTrace(this,this.constructor),Object.defineProperty(this,"_options",{value:R})}get request(){return this._options.request}get requestError(){return this._options.requestError}toJSON(){return{type:this.type,error:this.requestError}}}class S1 extends K${constructor(f,R){super(f);this.type=M1.PartialResponse,Error.captureStackTrace(this,this.constructor),Object.defineProperty(this,"_options",{value:R})}get request(){return this._options.request}get response(){return this._options.response}get responseError(){return this._options.responseError}get rawContent(){return this._options.rawContent}toJSON(){return{type:this.type,error:this.responseError}}}class D1 extends K${constructor(f,R){super(f);if(this.type=M1.Response,Error.captureStackTrace(this,this.constructor),Object.defineProperty(this,"_options",{value:R}),this.code=R.code,this.headers=R.headers,this.rateLimit=R.rateLimit,R.data&&typeof R.data==="object"&&"error"in R.data&&!R.data.errors){let h={...R.data};h.errors=[{code:ER.InternalError,message:h.error}],this.data=h}else this.data=R.data}get request(){return this._options.request}get response(){return this._options.response}hasErrorCode(...f){let R=this.errors;if(!(R===null||R===void 0?void 0:R.length))return!1;if("code"in R[0])return R.some((G)=>f.includes(G.code));let h=this.data;return f.includes(h.type)}get errors(){var f;return(f=this.data)===null||f===void 0?void 0:f.errors}get rateLimitError(){return this.code===420||this.code===429}get isAuthError(){if(this.code===401)return!0;return this.hasErrorCode(ER.AuthTimestampInvalid,ER.AuthenticationFail,ER.BadAuthenticationData,ER.InvalidOrExpiredToken)}toJSON(){return{type:this.type,code:this.code,error:this.data,rateLimit:this.rateLimit,headers:this.headers}}}var ER;(function(f){f[f.InvalidCoordinates=3]="InvalidCoordinates",f[f.NoLocationFound=13]="NoLocationFound",f[f.AuthenticationFail=32]="AuthenticationFail",f[f.InvalidOrExpiredToken=89]="InvalidOrExpiredToken",f[f.UnableToVerifyCredentials=99]="UnableToVerifyCredentials",f[f.AuthTimestampInvalid=135]="AuthTimestampInvalid",f[f.BadAuthenticationData=215]="BadAuthenticationData",f[f.NoUserMatch=17]="NoUserMatch",f[f.UserNotFound=50]="UserNotFound",f[f.ResourceNotFound=34]="ResourceNotFound",f[f.TweetNotFound=144]="TweetNotFound",f[f.TweetNotVisible=179]="TweetNotVisible",f[f.NotAllowedResource=220]="NotAllowedResource",f[f.MediaIdNotFound=325]="MediaIdNotFound",f[f.TweetNoLongerAvailable=421]="TweetNoLongerAvailable",f[f.TweetViolatedRules=422]="TweetViolatedRules",f[f.TargetUserSuspended=63]="TargetUserSuspended",f[f.YouAreSuspended=64]="YouAreSuspended",f[f.AccountUpdateFailed=120]="AccountUpdateFailed",f[f.NoSelfSpamReport=36]="NoSelfSpamReport",f[f.NoSelfMute=271]="NoSelfMute",f[f.AccountLocked=326]="AccountLocked",f[f.RateLimitExceeded=88]="RateLimitExceeded",f[f.NoDMRightForApp=93]="NoDMRightForApp",f[f.OverCapacity=130]="OverCapacity",f[f.InternalError=131]="InternalError",f[f.TooManyFollowings=161]="TooManyFollowings",f[f.TweetLimitExceeded=185]="TweetLimitExceeded",f[f.DuplicatedTweet=187]="DuplicatedTweet",f[f.TooManySpamReports=205]="TooManySpamReports",f[f.RequestLooksLikeSpam=226]="RequestLooksLikeSpam",f[f.NoWriteRightForApp=261]="NoWriteRightForApp",f[f.TweetActionsDisabled=425]="TweetActionsDisabled",f[f.TweetRepliesRestricted=433]="TweetRepliesRestricted",f[f.NamedParameterMissing=38]="NamedParameterMissing",f[f.InvalidAttachmentUrl=44]="InvalidAttachmentUrl",f[f.TweetTextTooLong=186]="TweetTextTooLong",f[f.MissingUrlParameter=195]="MissingUrlParameter",f[f.NoMultipleGifs=323]="NoMultipleGifs",f[f.InvalidMediaIds=324]="InvalidMediaIds",f[f.InvalidUrl=407]="InvalidUrl",f[f.TooManyTweetAttachments=386]="TooManyTweetAttachments",f[f.StatusAlreadyFavorited=139]="StatusAlreadyFavorited",f[f.FollowRequestAlreadySent=160]="FollowRequestAlreadySent",f[f.CannotUnmuteANonMutedAccount=272]="CannotUnmuteANonMutedAccount",f[f.TweetAlreadyRetweeted=327]="TweetAlreadyRetweeted",f[f.ReplyToDeletedTweet=385]="ReplyToDeletedTweet",f[f.DMReceiverNotFollowingYou=150]="DMReceiverNotFollowingYou",f[f.UnableToSendDM=151]="UnableToSendDM",f[f.MustAllowDMFromAnyone=214]="MustAllowDMFromAnyone",f[f.CannotSendDMToThisUser=349]="CannotSendDMToThisUser",f[f.DMTextTooLong=354]="DMTextTooLong",f[f.SubscriptionAlreadyExists=355]="SubscriptionAlreadyExists",f[f.CallbackUrlNotApproved=415]="CallbackUrlNotApproved",f[f.SuspendedApplication=416]="SuspendedApplication",f[f.OobOauthIsNotAllowed=417]="OobOauthIsNotAllowed"})(ER||(ER={}));var eH;(function(f){f.InvalidRequest="https://developer.x.com/en/support/x-api/error-troubleshooting#invalid-request",f.ClientForbidden="https://developer.x.com/en/support/x-api/error-troubleshooting#client-forbidden",f.UnsupportedAuthentication="https://developer.x.com/en/support/x-api/error-troubleshooting#unsupported-authentication",f.InvalidRules="https://developer.x.com/en/support/x-api/error-troubleshooting#invalid-rules",f.TooManyRules="https://developer.x.com/en/support/x-api/error-troubleshooting#rule-cap",f.DuplicatedRules="https://developer.x.com/en/support/x-api/error-troubleshooting#duplicate-rules",f.RateLimitExceeded="https://developer.x.com/en/support/x-api/error-troubleshooting#usage-capped",f.ConnectionError="https://developer.x.com/en/support/x-api/error-troubleshooting#streaming-connection",f.ClientDisconnected="https://developer.x.com/en/support/x-api/error-troubleshooting#client-disconnected",f.TwitterDisconnectedYou="https://developer.x.com/en/support/x-api/error-troubleshooting#operational-disconnect",f.ResourceNotFound="https://developer.x.com/en/support/x-api/error-troubleshooting#resource-not-found",f.ResourceUnauthorized="https://developer.x.com/en/support/x-api/error-troubleshooting#not-authorized-for-resource",f.DisallowedResource="https://developer.x.com/en/support/x-api/error-troubleshooting#disallowed-resource"})(eH||(eH={}));var v;(function(f){f.Connected="connected",f.ConnectError="connect error",f.ConnectionError="connection error",f.ConnectionClosed="connection closed",f.ConnectionLost="connection lost",f.ReconnectAttempt="reconnect attempt",f.Reconnected="reconnected",f.ReconnectError="reconnect error",f.ReconnectLimitExceeded="reconnect limit exceeded",f.DataKeepAlive="data keep-alive",f.Data="data event content",f.DataError="data twitter error",f.TweetParseError="data tweet parse error",f.Error="stream error"})(v||(v={}));class z1{constructor(f){this.value=f}}import*as NA from"fs";var Yf={debug:!1,deprecationWarnings:!0,logger:{log:console.log.bind(console)}};function cG(f){let R={value:void 0,promise:f().then((h)=>{return R.value=h,h})};return R}function v$(f){if(Array.isArray(f))return f;return[f]}function f7(f){for(let R in f)if(f[R]===void 0)delete f[R]}function j$(f){return typeof f==="object"&&"errors"in f&&!("data"in f)}function Q1(f){if(Array.isArray(f)&&f.length>1)return!0;return f.toString().includes(",")}var tH=new Set;function bG(f){if(typeof console>"u"||!console.warn||!Yf.deprecationWarnings)return;let R=`${f.instance}-${f.method}-${f.problem}`;if(tH.has(R))return;let h=`[twitter-api-v2] Deprecation warning: In ${f.instance}.${f.method}() call, ${f.problem}.
73
+ `},a9=(f,R={})=>{return CH.default.html(f,VG(VG({},d9),R))},i9=[{selector:"img",format:"skip"},{selector:"#__react-email-preview",format:"skip"},{selector:"a",options:{linkBrackets:!1}}];var TH=new TextDecoder("utf-8"),gH=(f)=>EG(void 0,null,function*(){let R="";if("pipeTo"in f){let h=new WritableStream({write($){R+=TH.decode($)}});yield f.pipeTo(h)}else{let h=new r9({write($,G,A){R+=TH.decode($),A()}});return f.pipe(h),new Promise(($,G)=>{h.on("error",G),h.on("close",()=>{$(R)})})}return R}),L$=(f,R)=>EG(void 0,null,function*(){let{default:h}=yield import("react-dom/server"),$;if(Object.hasOwn(h,"renderToReadableStream"))$=yield gH(yield h.renderToReadableStream(f));else yield new Promise((W,F)=>{let N=h.renderToPipeableStream(f,{onAllReady(){return EG(this,null,function*(){$=yield gH(N),W()})},onError(U){F(U)}})});if(R==null?void 0:R.plainText)return NG($,VG({selectors:i9},R.htmlToTextOptions));let A=`${'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'}${$.replace(/<!DOCTYPE.*?>/,"")}`;if(R==null?void 0:R.pretty)return a9(A);return A});var{defineProperty:p9,defineProperties:o9,getOwnPropertyDescriptors:n9,getOwnPropertySymbols:mH}=Object,u9=Object.prototype.hasOwnProperty,e9=Object.prototype.propertyIsEnumerable,cH=(f,R,h)=>(R in f)?p9(f,R,{enumerable:!0,configurable:!0,writable:!0,value:h}):f[R]=h,J1=(f,R)=>{for(var h in R||(R={}))if(u9.call(R,h))cH(f,h,R[h]);if(mH){for(var h of mH(R))if(e9.call(R,h))cH(f,h,R[h])}return f},t9=(f,R)=>o9(f,n9(R)),m=(f,R,h)=>{return new Promise(($,G)=>{var A=(N)=>{try{F(h.next(N))}catch(U){G(U)}},W=(N)=>{try{F(h.throw(N))}catch(U){G(U)}},F=(N)=>N.done?$(N.value):Promise.resolve(N.value).then(A,W);F((h=h.apply(f,R)).next())})},fD="3.5.0",RD=class{constructor(f){this.resend=f}create(f){return m(this,arguments,function*(R,h={}){return yield this.resend.post("/api-keys",R,h)})}list(){return m(this,null,function*(){return yield this.resend.get("/api-keys")})}remove(f){return m(this,null,function*(){return yield this.resend.delete(`/api-keys/${f}`)})}},hD=class{constructor(f){this.resend=f}create(f){return m(this,arguments,function*(R,h={}){return yield this.resend.post("/audiences",R,h)})}list(){return m(this,null,function*(){return yield this.resend.get("/audiences")})}get(f){return m(this,null,function*(){return yield this.resend.get(`/audiences/${f}`)})}remove(f){return m(this,null,function*(){return yield this.resend.delete(`/audiences/${f}`)})}},$D=class{constructor(f){this.resend=f}send(f){return m(this,arguments,function*(R,h={}){return this.create(R,h)})}create(f){return m(this,arguments,function*(R,h={}){for(let G of R)if(G.react)G.html=yield L$(G.react),delete G.react;return yield this.resend.post("/emails/batch",R,h)})}},GD=class{constructor(f){this.resend=f}create(f){return m(this,arguments,function*(R,h={}){return yield this.resend.post(`/audiences/${R.audienceId}/contacts`,{unsubscribed:R.unsubscribed,email:R.email,first_name:R.firstName,last_name:R.lastName},h)})}list(f){return m(this,null,function*(){return yield this.resend.get(`/audiences/${f.audienceId}/contacts`)})}get(f){return m(this,null,function*(){return yield this.resend.get(`/audiences/${f.audienceId}/contacts/${f.id}`)})}update(f){return m(this,null,function*(){return yield this.resend.patch(`/audiences/${f.audienceId}/contacts/${f.id}`,{unsubscribed:f.unsubscribed,first_name:f.firstName,last_name:f.lastName})})}remove(f){return m(this,null,function*(){return yield this.resend.delete(`/audiences/${f.audienceId}/contacts/${(f==null?void 0:f.email)?f==null?void 0:f.email:f==null?void 0:f.id}`)})}},AD=class{constructor(f){this.resend=f}create(f){return m(this,arguments,function*(R,h={}){return yield this.resend.post("/domains",R,h)})}list(){return m(this,null,function*(){return yield this.resend.get("/domains")})}get(f){return m(this,null,function*(){return yield this.resend.get(`/domains/${f}`)})}update(f){return m(this,null,function*(){return yield this.resend.patch(`/domains/${f.id}`,{click_tracking:f.clickTracking,open_tracking:f.openTracking,tls:f.tls})})}remove(f){return m(this,null,function*(){return yield this.resend.delete(`/domains/${f}`)})}verify(f){return m(this,null,function*(){return yield this.resend.post(`/domains/${f}/verify`)})}},WD=class{constructor(f){this.resend=f}send(f){return m(this,arguments,function*(R,h={}){return this.create(R,h)})}create(f){return m(this,arguments,function*(R,h={}){if(R.react)R.html=yield L$(R.react),delete R.react;return yield this.resend.post("/emails",R,h)})}get(f){return m(this,null,function*(){return yield this.resend.get(`/emails/${f}`)})}},bH="https://api.resend.com",xH=`resend-node:${fD}`,FD=typeof process<"u"&&process.env?process.env.RESEND_BASE_URL||bH:bH,ND=typeof process<"u"&&process.env?process.env.RESEND_USER_AGENT||xH:xH,kH=class{constructor(f){if(this.key=f,this.apiKeys=new RD(this),this.audiences=new hD(this),this.batch=new $D(this),this.contacts=new GD(this),this.domains=new AD(this),this.emails=new WD(this),!f){if(typeof process<"u"&&process.env)this.key=process.env.RESEND_API_KEY;if(!this.key)throw Error('Missing API key. Pass it to the constructor `new Resend("re_123")`')}this.headers=new Headers({Authorization:`Bearer ${this.key}`,"User-Agent":ND,"Content-Type":"application/json"})}fetchRequest(f){return m(this,arguments,function*(R,h={}){try{let $=yield fetch(`${FD}${R}`,h);if(!$.ok)try{let A=yield $.text();return{data:null,error:JSON.parse(A)}}catch(A){if(A instanceof SyntaxError)return{data:null,error:{name:"application_error",message:"Internal server error. We are unable to process your request right now, please try again later."}};let W={message:$.statusText,name:"application_error"};if(A instanceof Error)return{data:null,error:t9(J1({},W),{message:A.message})};return{data:null,error:W}}return{data:yield $.json(),error:null}}catch($){return{data:null,error:{name:"application_error",message:"Unable to fetch data. The request could not be resolved."}}}})}post(f,R){return m(this,arguments,function*(h,$,G={}){let A=J1({method:"POST",headers:this.headers,body:JSON.stringify($)},G);return this.fetchRequest(h,A)})}get(f){return m(this,arguments,function*(R,h={}){let $=J1({method:"GET",headers:this.headers},h);return this.fetchRequest(R,$)})}put(f,R){return m(this,arguments,function*(h,$,G={}){let A=J1({method:"PUT",headers:this.headers,body:JSON.stringify($)},G);return this.fetchRequest(h,A)})}patch(f,R){return m(this,arguments,function*(h,$,G={}){let A=J1({method:"PATCH",headers:this.headers,body:JSON.stringify($)},G);return this.fetchRequest(h,A)})}delete(f,R){return m(this,null,function*(){let h={method:"DELETE",headers:this.headers,body:JSON.stringify(R)};return this.fetchRequest(f,h)})}};class I${}class w$ extends I${apiKey;constructor(f=process.env.RESEND_API_KEY){super();this.apiKey=f}async send(f){let R=new kH(this.apiKey),{data:h,error:$}=await R.emails.send({...f});if($)return console.error($),!1;if(h)return!0;return!1}}class lH extends r{driver=new w$;headers={};boot(){}filterRecipients(f){return f}}class sH extends r{channels={};boot(){}}class _H extends r{root;rootRouter;boot(){}onRequestStart(f){}onRequestEnd(f){}onRequestFail(f,R){}}class dH extends r{rootRouter;boot(){}onRequestStart(f){}onRequestEnd(f){}onRequestFail(f,R){}}class aH extends r{maxFileSize=10485760;boot(){}onLogFileClosed(f){}onLogCreated(f){}}class iH extends r{jobs=[];concurrency=1;boot(){}}class pH{static name="unset";worker=!1;maxAttempts=3;run(...f){}onFail(f,...R){}onSuccess(f,...R){}onDeadletter(f,...R){}static dispatch(...f){if(this.name==="unset")throw Error("Cannot dispatch a job with no name");rH.use().push(this,JSON.stringify(f))}}import UD from"sharp";class q${}class P$ extends q${async resize(f,R){let{height:h,width:$,quality:G,fit:A}=R;return await UD(f).resize($>0?$:void 0,h>0?h:void 0,{fit:A}).webp({quality:G>0?G:80,force:!0}).toBuffer()}}class oH extends r{driver=new P$;boot(){}}class U0{}var HD={clientId:process.env.GOOGLE_CLIENT_ID,clientSecret:process.env.GOOGLE_CLIENT_SECRET,redirectPath:"/auth/oauth/google/callback",scope:"https://www.googleapis.com/auth/userinfo.email"};class nH extends U0{config;constructor(f={}){super();this.config={...HD,...f}}getRedirectUrl(){let f=this.config.scope,R=this.config.clientId,h=new URL("https://accounts.google.com/o/oauth2/v2/auth"),$={scope:f,include_granted_scopes:"true",response_type:"code",state:"state_parameter_passthrough_value",redirect_uri:`${process.env.HOST_NAME}/auth/oauth/google/callback`,client_id:R};for(let[A,W]of Object.entries($))h.searchParams.append(A,W);let G=h.toString();return B$.to(G),G}async onCallback(f){let R=new URL("https://oauth2.googleapis.com/token");R.searchParams.append("code",f.search.get("code")),R.searchParams.append("client_id",this.config.clientId),R.searchParams.append("client_secret",this.config.clientSecret),R.searchParams.append("grant_type","authorization_code"),R.searchParams.append("redirect_uri",`${process.env.HOST_NAME}${this.config.redirectPath}`);let h=await fetch(R.toString(),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"}}),{access_token:$}=await h.json(),A=await(await fetch(`https://www.googleapis.com/oauth2/v3/userinfo?access_token=${$}`)).json();return{name:A.name,email:A.email}}}var YR="https://api.x.com/2/",H0="https://api.x.com/labs/2/",ZR="https://api.x.com/1.1/",pf="https://upload.x.com/1.1/",uH="https://stream.x.com/1.1/",Y0="https://ads-api.x.com/12/",Z0="https://ads-api-sandbox.twitter.com/12/";class TG{constructor({realData:f,rateLimit:R,instance:h,queryParams:$,sharedParams:G}){this._maxResultsWhenFetchLast=100,this._realData=f,this._rateLimit=R,this._instance=h,this._queryParams=$,this._sharedParams=G}get _isRateLimitOk(){if(!this._rateLimit)return!0;if(this._rateLimit.reset*1000<Date.now())return!0;return this._rateLimit.remaining>0}makeRequest(f){return this._instance.get(this.getEndpoint(),f,{fullResponse:!0,params:this._sharedParams})}makeNewInstanceFromResult(f,R){return new this.constructor({realData:f.data,rateLimit:f.rateLimit,instance:this._instance,queryParams:R,sharedParams:this._sharedParams})}getEndpoint(){return this._endpoint}injectQueryParams(f){return{...f?{max_results:f}:{},...this._queryParams}}async next(f){let R=this.getNextQueryParams(f),h=await this.makeRequest(R);return this.makeNewInstanceFromResult(h,R)}async fetchNext(f){let R=this.getNextQueryParams(f),h=await this.makeRequest(R);return await this.refreshInstanceFromResult(h,!0),this}async fetchLast(f=1/0){let R=this.getNextQueryParams(this._maxResultsWhenFetchLast),h=0;while(h<f&&this._isRateLimitOk){let $=await this.makeRequest(R);if(await this.refreshInstanceFromResult($,!0),h+=this.getPageLengthFromRequest($),this.isFetchLastOver($))break;R=this.getNextQueryParams(this._maxResultsWhenFetchLast)}return this}get rateLimit(){var f;return{...(f=this._rateLimit)!==null&&f!==void 0?f:{}}}get data(){return this._realData}get done(){return!this.canFetchNextPage(this._realData)}*[Symbol.iterator](){yield*this.getItemArray()}async*[Symbol.asyncIterator](){yield*this.getItemArray();let f=this,R=this.canFetchNextPage(this._realData);while(R&&this._isRateLimitOk&&f.getItemArray().length>0){let h=await f.next(this._maxResultsWhenFetchLast);this.refreshInstanceFromResult({data:h._realData,headers:{},rateLimit:h._rateLimit},!0),R=this.canFetchNextPage(h._realData),yield*h.getItemArray(),f=h}}async*fetchAndIterate(){for(let h of this.getItemArray())yield[h,this];let f=this,R=this.canFetchNextPage(this._realData);while(R&&this._isRateLimitOk&&f.getItemArray().length>0){let h=await f.next(this._maxResultsWhenFetchLast);this.refreshInstanceFromResult({data:h._realData,headers:{},rateLimit:h._rateLimit},!0),R=this.canFetchNextPage(h._realData);for(let $ of h.getItemArray())yield[$,h];this._rateLimit=h._rateLimit,f=h}}}class gG extends TG{async previous(f){let R=this.getPreviousQueryParams(f),h=await this.makeRequest(R);return this.makeNewInstanceFromResult(h,R)}async fetchPrevious(f){let R=this.getPreviousQueryParams(f),h=await this.makeRequest(R);return await this.refreshInstanceFromResult(h,!1),this}}var J0=TG;class Ff extends J0{getNextQueryParams(f){var R;return{...this._queryParams,cursor:(R=this._realData.next_cursor_str)!==null&&R!==void 0?R:this._realData.next_cursor,...f?{count:f}:{}}}isFetchLastOver(f){return!this.canFetchNextPage(f.data)}canFetchNextPage(f){return!this.isNextCursorInvalid(f.next_cursor)||!this.isNextCursorInvalid(f.next_cursor_str)}isNextCursorInvalid(f){return f===void 0||f===0||f===-1||f==="0"||f==="-1"}}class CG extends Ff{constructor(){super(...arguments);this._endpoint="direct_messages/events/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.events.push(...h.events),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.events.length}getItemArray(){return this.events}get events(){return this._realData.events}}class mG extends Ff{constructor(){super(...arguments);this._endpoint="direct_messages/welcome_messages/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.welcome_messages.push(...h.welcome_messages),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.welcome_messages.length}getItemArray(){return this.welcomeMessages}get welcomeMessages(){return this._realData.welcome_messages}}var d;(function(f){f.Jpeg="image/jpeg",f.Mp4="video/mp4",f.Mov="video/quicktime",f.Gif="image/gif",f.Png="image/png",f.Srt="text/plain",f.Webp="image/webp"})(d||(d={}));var JR;(function(f){f.Create="message_create",f.WelcomeCreate="welcome_message"})(JR||(JR={}));var M1;(function(f){f.Request="request",f.PartialResponse="partial-response",f.Response="response"})(M1||(M1={}));class K$ extends Error{constructor(){super(...arguments);this.error=!0}}class X1 extends K${constructor(f,R){super(f);this.type=M1.Request,Error.captureStackTrace(this,this.constructor),Object.defineProperty(this,"_options",{value:R})}get request(){return this._options.request}get requestError(){return this._options.requestError}toJSON(){return{type:this.type,error:this.requestError}}}class S1 extends K${constructor(f,R){super(f);this.type=M1.PartialResponse,Error.captureStackTrace(this,this.constructor),Object.defineProperty(this,"_options",{value:R})}get request(){return this._options.request}get response(){return this._options.response}get responseError(){return this._options.responseError}get rawContent(){return this._options.rawContent}toJSON(){return{type:this.type,error:this.responseError}}}class D1 extends K${constructor(f,R){super(f);if(this.type=M1.Response,Error.captureStackTrace(this,this.constructor),Object.defineProperty(this,"_options",{value:R}),this.code=R.code,this.headers=R.headers,this.rateLimit=R.rateLimit,R.data&&typeof R.data==="object"&&"error"in R.data&&!R.data.errors){let h={...R.data};h.errors=[{code:ER.InternalError,message:h.error}],this.data=h}else this.data=R.data}get request(){return this._options.request}get response(){return this._options.response}hasErrorCode(...f){let R=this.errors;if(!(R===null||R===void 0?void 0:R.length))return!1;if("code"in R[0])return R.some((G)=>f.includes(G.code));let h=this.data;return f.includes(h.type)}get errors(){var f;return(f=this.data)===null||f===void 0?void 0:f.errors}get rateLimitError(){return this.code===420||this.code===429}get isAuthError(){if(this.code===401)return!0;return this.hasErrorCode(ER.AuthTimestampInvalid,ER.AuthenticationFail,ER.BadAuthenticationData,ER.InvalidOrExpiredToken)}toJSON(){return{type:this.type,code:this.code,error:this.data,rateLimit:this.rateLimit,headers:this.headers}}}var ER;(function(f){f[f.InvalidCoordinates=3]="InvalidCoordinates",f[f.NoLocationFound=13]="NoLocationFound",f[f.AuthenticationFail=32]="AuthenticationFail",f[f.InvalidOrExpiredToken=89]="InvalidOrExpiredToken",f[f.UnableToVerifyCredentials=99]="UnableToVerifyCredentials",f[f.AuthTimestampInvalid=135]="AuthTimestampInvalid",f[f.BadAuthenticationData=215]="BadAuthenticationData",f[f.NoUserMatch=17]="NoUserMatch",f[f.UserNotFound=50]="UserNotFound",f[f.ResourceNotFound=34]="ResourceNotFound",f[f.TweetNotFound=144]="TweetNotFound",f[f.TweetNotVisible=179]="TweetNotVisible",f[f.NotAllowedResource=220]="NotAllowedResource",f[f.MediaIdNotFound=325]="MediaIdNotFound",f[f.TweetNoLongerAvailable=421]="TweetNoLongerAvailable",f[f.TweetViolatedRules=422]="TweetViolatedRules",f[f.TargetUserSuspended=63]="TargetUserSuspended",f[f.YouAreSuspended=64]="YouAreSuspended",f[f.AccountUpdateFailed=120]="AccountUpdateFailed",f[f.NoSelfSpamReport=36]="NoSelfSpamReport",f[f.NoSelfMute=271]="NoSelfMute",f[f.AccountLocked=326]="AccountLocked",f[f.RateLimitExceeded=88]="RateLimitExceeded",f[f.NoDMRightForApp=93]="NoDMRightForApp",f[f.OverCapacity=130]="OverCapacity",f[f.InternalError=131]="InternalError",f[f.TooManyFollowings=161]="TooManyFollowings",f[f.TweetLimitExceeded=185]="TweetLimitExceeded",f[f.DuplicatedTweet=187]="DuplicatedTweet",f[f.TooManySpamReports=205]="TooManySpamReports",f[f.RequestLooksLikeSpam=226]="RequestLooksLikeSpam",f[f.NoWriteRightForApp=261]="NoWriteRightForApp",f[f.TweetActionsDisabled=425]="TweetActionsDisabled",f[f.TweetRepliesRestricted=433]="TweetRepliesRestricted",f[f.NamedParameterMissing=38]="NamedParameterMissing",f[f.InvalidAttachmentUrl=44]="InvalidAttachmentUrl",f[f.TweetTextTooLong=186]="TweetTextTooLong",f[f.MissingUrlParameter=195]="MissingUrlParameter",f[f.NoMultipleGifs=323]="NoMultipleGifs",f[f.InvalidMediaIds=324]="InvalidMediaIds",f[f.InvalidUrl=407]="InvalidUrl",f[f.TooManyTweetAttachments=386]="TooManyTweetAttachments",f[f.StatusAlreadyFavorited=139]="StatusAlreadyFavorited",f[f.FollowRequestAlreadySent=160]="FollowRequestAlreadySent",f[f.CannotUnmuteANonMutedAccount=272]="CannotUnmuteANonMutedAccount",f[f.TweetAlreadyRetweeted=327]="TweetAlreadyRetweeted",f[f.ReplyToDeletedTweet=385]="ReplyToDeletedTweet",f[f.DMReceiverNotFollowingYou=150]="DMReceiverNotFollowingYou",f[f.UnableToSendDM=151]="UnableToSendDM",f[f.MustAllowDMFromAnyone=214]="MustAllowDMFromAnyone",f[f.CannotSendDMToThisUser=349]="CannotSendDMToThisUser",f[f.DMTextTooLong=354]="DMTextTooLong",f[f.SubscriptionAlreadyExists=355]="SubscriptionAlreadyExists",f[f.CallbackUrlNotApproved=415]="CallbackUrlNotApproved",f[f.SuspendedApplication=416]="SuspendedApplication",f[f.OobOauthIsNotAllowed=417]="OobOauthIsNotAllowed"})(ER||(ER={}));var eH;(function(f){f.InvalidRequest="https://developer.x.com/en/support/x-api/error-troubleshooting#invalid-request",f.ClientForbidden="https://developer.x.com/en/support/x-api/error-troubleshooting#client-forbidden",f.UnsupportedAuthentication="https://developer.x.com/en/support/x-api/error-troubleshooting#unsupported-authentication",f.InvalidRules="https://developer.x.com/en/support/x-api/error-troubleshooting#invalid-rules",f.TooManyRules="https://developer.x.com/en/support/x-api/error-troubleshooting#rule-cap",f.DuplicatedRules="https://developer.x.com/en/support/x-api/error-troubleshooting#duplicate-rules",f.RateLimitExceeded="https://developer.x.com/en/support/x-api/error-troubleshooting#usage-capped",f.ConnectionError="https://developer.x.com/en/support/x-api/error-troubleshooting#streaming-connection",f.ClientDisconnected="https://developer.x.com/en/support/x-api/error-troubleshooting#client-disconnected",f.TwitterDisconnectedYou="https://developer.x.com/en/support/x-api/error-troubleshooting#operational-disconnect",f.ResourceNotFound="https://developer.x.com/en/support/x-api/error-troubleshooting#resource-not-found",f.ResourceUnauthorized="https://developer.x.com/en/support/x-api/error-troubleshooting#not-authorized-for-resource",f.DisallowedResource="https://developer.x.com/en/support/x-api/error-troubleshooting#disallowed-resource"})(eH||(eH={}));var v;(function(f){f.Connected="connected",f.ConnectError="connect error",f.ConnectionError="connection error",f.ConnectionClosed="connection closed",f.ConnectionLost="connection lost",f.ReconnectAttempt="reconnect attempt",f.Reconnected="reconnected",f.ReconnectError="reconnect error",f.ReconnectLimitExceeded="reconnect limit exceeded",f.DataKeepAlive="data keep-alive",f.Data="data event content",f.DataError="data twitter error",f.TweetParseError="data tweet parse error",f.Error="stream error"})(v||(v={}));class z1{constructor(f){this.value=f}}import*as NA from"fs";var Yf={debug:!1,deprecationWarnings:!0,logger:{log:console.log.bind(console)}};function cG(f){let R={value:void 0,promise:f().then((h)=>{return R.value=h,h})};return R}function v$(f){if(Array.isArray(f))return f;return[f]}function f7(f){for(let R in f)if(f[R]===void 0)delete f[R]}function j$(f){return typeof f==="object"&&"errors"in f&&!("data"in f)}function Q1(f){if(Array.isArray(f)&&f.length>1)return!0;return f.toString().includes(",")}var tH=new Set;function bG(f){if(typeof console>"u"||!console.warn||!Yf.deprecationWarnings)return;let R=`${f.instance}-${f.method}-${f.problem}`;if(tH.has(R))return;let h=`[twitter-api-v2] Deprecation warning: In ${f.instance}.${f.method}() call, ${f.problem}.
74
74
  ${f.resolution}.`;console.warn(h),console.warn("To disable this message, import variable TwitterApiV2Settings from twitter-api-v2 and set TwitterApiV2Settings.deprecationWarnings to false."),tH.add(R)}import{EventEmitter as XD}from"events";import{request as YD}from"https";import*as Lf from"zlib";import{EventEmitter as ZD}from"events";class R7{constructor(f){this.requestData=f,this.requestErrorHandled=!1,this.responseData=[]}get hrefPathname(){let f=this.requestData.url;return f.hostname+f.pathname}isCompressionDisabled(){return!this.requestData.compression||this.requestData.compression==="identity"}isFormEncodedEndpoint(){return this.requestData.url.href.startsWith("https://api.x.com/oauth/")}createRequestError(f){if(Yf.debug)Yf.logger.log("Request error:",f);return new X1("Request failed.",{request:this.req,error:f})}createPartialResponseError(f,R){let $=`Request failed with partial response with HTTP code ${this.res.statusCode}`;if(R)$+=" (connection abruptly closed)";else $+=" (parse error)";return new S1($,{request:this.req,response:this.res,responseError:f,rawContent:Buffer.concat(this.responseData).toString()})}formatV1Errors(f){return f.map(({code:R,message:h})=>`${h} (Twitter code ${R})`).join(", ")}formatV2Error(f){return`${f.title}: ${f.detail} (see ${f.type})`}createResponseError({res:f,data:R,rateLimit:h,code:$}){var G;if(Yf.debug)Yf.logger.log(`Request failed with code ${$}, data:`,R),Yf.logger.log("Response headers:",f.headers);let A=`Request failed with code ${$}`;if((G=R===null||R===void 0?void 0:R.errors)===null||G===void 0?void 0:G.length){let W=R.errors;if("code"in W[0])A+=" - "+this.formatV1Errors(W);else A+=" - "+this.formatV2Error(R)}return new D1(A,{code:$,data:R,headers:f.headers,request:this.req,response:f,rateLimit:h})}getResponseDataStream(f){if(this.isCompressionDisabled())return f;let R=(f.headers["content-encoding"]||"identity").trim().toLowerCase();if(R==="br"){let h=Lf.createBrotliDecompress({flush:Lf.constants.BROTLI_OPERATION_FLUSH,finishFlush:Lf.constants.BROTLI_OPERATION_FLUSH});return f.pipe(h),h}if(R==="gzip"){let h=Lf.createGunzip({flush:Lf.constants.Z_SYNC_FLUSH,finishFlush:Lf.constants.Z_SYNC_FLUSH});return f.pipe(h),h}if(R==="deflate"){let h=Lf.createInflate({flush:Lf.constants.Z_SYNC_FLUSH,finishFlush:Lf.constants.Z_SYNC_FLUSH});return f.pipe(h),h}return f}detectResponseType(f){var R,h;if(((R=f.headers["content-type"])===null||R===void 0?void 0:R.includes("application/json"))||((h=f.headers["content-type"])===null||h===void 0?void 0:h.includes("application/problem+json")))return"json";else if(this.isFormEncodedEndpoint())return"url";return"text"}getParsedResponse(f){let R=this.responseData,h=this.requestData.forceParseMode||this.detectResponseType(f);if(h==="buffer")return Buffer.concat(R);else if(h==="text")return Buffer.concat(R).toString();else if(h==="json"){let $=Buffer.concat(R).toString();return $.length?JSON.parse($):void 0}else if(h==="url"){let $=Buffer.concat(R).toString(),G={};for(let[A,W]of new URLSearchParams($))G[A]=W;return G}else return}getRateLimitFromResponse(f){let R=void 0;if(f.headers["x-rate-limit-limit"]){if(R={limit:Number(f.headers["x-rate-limit-limit"]),remaining:Number(f.headers["x-rate-limit-remaining"]),reset:Number(f.headers["x-rate-limit-reset"])},f.headers["x-app-limit-24hour-limit"])R.day={limit:Number(f.headers["x-app-limit-24hour-limit"]),remaining:Number(f.headers["x-app-limit-24hour-remaining"]),reset:Number(f.headers["x-app-limit-24hour-reset"])};if(this.requestData.rateLimitSaver)this.requestData.rateLimitSaver(R)}return R}onSocketEventHandler(f,R,h){let $=this.onSocketCloseHandler.bind(this,f);h.on("close",$),R.on("complete",()=>h.off("close",$))}onSocketCloseHandler(f){if(this.req.removeAllListeners("timeout"),this.res)return;if(!this.requestErrorHandled)return f(this.createRequestError(Error("Socket closed without any information.")))}requestErrorHandler(f,R){var h,$;($=(h=this.requestData).requestEventDebugHandler)===null||$===void 0||$.call(h,"request-error",{requestError:R}),this.requestErrorHandled=!0,f(this.createRequestError(R))}timeoutErrorHandler(){this.requestErrorHandled=!0,this.req.destroy(Error("Request timeout."))}classicResponseHandler(f,R,h){this.res=h;let $=this.getResponseDataStream(h);if($.on("data",(G)=>this.responseData.push(G)),$.on("end",this.onResponseEndHandler.bind(this,f,R)),$.on("close",this.onResponseCloseHandler.bind(this,f,R)),this.requestData.requestEventDebugHandler)this.requestData.requestEventDebugHandler("response",{res:h}),h.on("aborted",(G)=>this.requestData.requestEventDebugHandler("response-aborted",{error:G})),h.on("error",(G)=>this.requestData.requestEventDebugHandler("response-error",{error:G})),h.on("close",()=>this.requestData.requestEventDebugHandler("response-close",{data:this.responseData})),h.on("end",()=>this.requestData.requestEventDebugHandler("response-end"))}onResponseEndHandler(f,R){let h=this.getRateLimitFromResponse(this.res),$;try{$=this.getParsedResponse(this.res)}catch(A){R(this.createPartialResponseError(A,!1));return}let G=this.res.statusCode;if(G>=400){R(this.createResponseError({data:$,res:this.res,rateLimit:h,code:G}));return}if(Yf.debug)Yf.logger.log(`[${this.requestData.options.method} ${this.hrefPathname}]: Request succeeds with code ${this.res.statusCode}`),Yf.logger.log("Response body:",$);f({data:$,headers:this.res.headers,rateLimit:h})}onResponseCloseHandler(f,R){let h=this.res;if(h.aborted)try{return this.getParsedResponse(this.res),this.onResponseEndHandler(f,R)}catch($){return R(this.createPartialResponseError($,!0))}if(!h.complete)return R(this.createPartialResponseError(Error("Response has been interrupted before response could be parsed."),!0))}streamResponseHandler(f,R,h){if(h.statusCode<400){if(Yf.debug)Yf.logger.log(`[${this.requestData.options.method} ${this.hrefPathname}]: Request succeeds with code ${h.statusCode} (starting stream)`);let G=this.getResponseDataStream(h);f({req:this.req,res:G,originalResponse:h,requestData:this.requestData})}else this.classicResponseHandler(()=>{return},R,h)}debugRequest(){let f=this.requestData.url;if(Yf.logger.log(`[${this.requestData.options.method} ${this.hrefPathname}]`,this.requestData.options),f.search)Yf.logger.log("Request parameters:",[...f.searchParams.entries()].map(([R,h])=>`${R}: ${h}`));if(this.requestData.body)Yf.logger.log("Request body:",this.requestData.body)}buildRequest(){var f;let R=this.requestData.url,h=R.username?`${R.username}:${R.password}`:void 0,$=(f=this.requestData.options.headers)!==null&&f!==void 0?f:{};if(this.requestData.compression===!0||this.requestData.compression==="brotli")$["accept-encoding"]="br;q=1.0, gzip;q=0.8, deflate;q=0.5, *;q=0.1";else if(this.requestData.compression==="gzip")$["accept-encoding"]="gzip;q=1, deflate;q=0.5, *;q=0.1";else if(this.requestData.compression==="deflate")$["accept-encoding"]="deflate;q=1, *;q=0.1";if(Yf.debug)this.debugRequest();this.req=YD({...this.requestData.options,host:R.hostname,port:R.port||void 0,path:R.pathname+R.search,protocol:R.protocol,auth:h,headers:$})}registerRequestEventDebugHandlers(f){f.on("close",()=>this.requestData.requestEventDebugHandler("close")),f.on("abort",()=>this.requestData.requestEventDebugHandler("abort")),f.on("socket",(R)=>{this.requestData.requestEventDebugHandler("socket",{socket:R}),R.on("error",(h)=>this.requestData.requestEventDebugHandler("socket-error",{socket:R,error:h})),R.on("connect",()=>this.requestData.requestEventDebugHandler("socket-connect",{socket:R})),R.on("close",(h)=>this.requestData.requestEventDebugHandler("socket-close",{socket:R,withError:h})),R.on("end",()=>this.requestData.requestEventDebugHandler("socket-end",{socket:R})),R.on("lookup",(...h)=>this.requestData.requestEventDebugHandler("socket-lookup",{socket:R,data:h})),R.on("timeout",()=>this.requestData.requestEventDebugHandler("socket-timeout",{socket:R}))})}makeRequest(){return this.buildRequest(),new Promise((f,R)=>{let h=(W)=>{G.emit("complete"),f(W)},$=(W)=>{G.emit("complete"),R(W)},G=new ZD,A=this.req;if(A.on("error",this.requestErrorHandler.bind(this,$)),A.on("socket",this.onSocketEventHandler.bind(this,$,G)),A.on("response",this.classicResponseHandler.bind(this,h,$)),this.requestData.options.timeout)A.on("timeout",this.timeoutErrorHandler.bind(this));if(this.requestData.requestEventDebugHandler)this.registerRequestEventDebugHandlers(A);if(this.requestData.body)A.write(this.requestData.body);A.end()})}async makeRequestAsStream(){let{req:f,res:R,requestData:h,originalResponse:$}=await this.makeRequestAndResolveWhenReady();return new y$(h,{req:f,res:R,originalResponse:$})}makeRequestAndResolveWhenReady(){return this.buildRequest(),new Promise((f,R)=>{let h=this.req;if(h.on("error",this.requestErrorHandler.bind(this,R)),h.on("response",this.streamResponseHandler.bind(this,f,R)),this.requestData.body)h.write(this.requestData.body);h.end()})}}var L1=R7;import{EventEmitter as JD}from"events";class h7 extends JD{constructor(f){super();this.stream=f,this.stack=[],this.onStreamData=this.onStreamData.bind(this),this.onStreamError=this.onStreamError.bind(this),this.onceNewEvent=this.once.bind(this,"event"),f.on(v.Data,this.onStreamData),f.on(v.ConnectionError,this.onStreamError),f.on(v.TweetParseError,this.onStreamError),f.on(v.ConnectionClosed,this.onStreamError)}nextEvent(){return new Promise(this.onceNewEvent)}hasStack(){return this.stack.length>0}popStack(){let f=this.stack;return this.stack=[],f}destroy(){this.removeAllListeners(),this.stream.off(v.Data,this.onStreamData),this.stream.off(v.ConnectionError,this.onStreamError),this.stream.off(v.TweetParseError,this.onStreamError),this.stream.off(v.ConnectionClosed,this.onStreamError)}emitEvent(f,R){this.emit("event",{type:f,payload:R})}onStreamError(f){this.emitEvent("error",f)}onStreamData(f){this.stack.push(f),this.emitEvent("data",f)}}var $7=h7;import{EventEmitter as MD}from"events";class O$ extends MD{constructor(){super(...arguments);this.currentMessage=""}push(f){this.currentMessage+=f,f=this.currentMessage;let R=f.length,h=0,$=0;while($<R){if(f.slice($,$+2)===`\r
75
75
  `){let G=f.slice(h,$);if(h=$+=2,!G.length)continue;try{let A=JSON.parse(G);if(A){this.emit(TR.ParsedData,A);continue}}catch(A){this.emit(TR.ParseError,A)}}$++}this.currentMessage=f.slice(h,R)}reset(){this.currentMessage=""}}var TR;(function(f){f.ParsedData="parsed data",f.ParseError="parse error"})(TR||(TR={}));var G7=[5,15,30,60,90,120,180,300,600,900],SD=(f)=>f>G7.length?901000:G7[f-1]*1000;class A7 extends XD{constructor(f,R){super();if(this.requestData=f,this.autoReconnect=!1,this.autoReconnectRetries=5,this.keepAliveTimeoutMs=120000,this.nextRetryTimeout=SD,this.parser=new O$,this.connectionProcessRunning=!1,this.onKeepAliveTimeout=this.onKeepAliveTimeout.bind(this),this.initEventsFromParser(),R)this.req=R.req,this.res=R.res,this.originalResponse=R.originalResponse,this.initEventsFromRequest()}on(f,R){return super.on(f,R)}initEventsFromRequest(){if(!this.req||!this.res)throw Error("TweetStream error: You cannot init TweetStream without a request and response object.");let f=(R)=>{this.emit(v.ConnectionError,R),this.emit(v.Error,{type:v.ConnectionError,error:R,message:"Connection lost or closed by Twitter."}),this.onConnectionError()};this.req.on("error",f),this.res.on("error",f),this.res.on("close",()=>f(Error("Connection closed by Twitter."))),this.res.on("data",(R)=>{if(this.resetKeepAliveTimeout(),R.toString()===`\r
76
76
  `)return this.emit(v.DataKeepAlive);this.parser.push(R.toString())}),this.resetKeepAliveTimeout()}initEventsFromParser(){let f=this.requestData.payloadIsError;this.parser.on(TR.ParsedData,(R)=>{if(f&&f(R))this.emit(v.DataError,R),this.emit(v.Error,{type:v.DataError,error:R,message:"Twitter sent a payload that is detected as an error payload."});else this.emit(v.Data,R)}),this.parser.on(TR.ParseError,(R)=>{this.emit(v.TweetParseError,R),this.emit(v.Error,{type:v.TweetParseError,error:R,message:"Failed to parse stream data."})})}resetKeepAliveTimeout(){if(this.unbindKeepAliveTimeout(),this.keepAliveTimeoutMs!==1/0)this.keepAliveTimeout=setTimeout(this.onKeepAliveTimeout,this.keepAliveTimeoutMs)}onKeepAliveTimeout(){this.emit(v.ConnectionLost),this.onConnectionError()}unbindTimeouts(){this.unbindRetryTimeout(),this.unbindKeepAliveTimeout()}unbindKeepAliveTimeout(){if(this.keepAliveTimeout)clearTimeout(this.keepAliveTimeout),this.keepAliveTimeout=void 0}unbindRetryTimeout(){if(this.retryTimeout)clearTimeout(this.retryTimeout),this.retryTimeout=void 0}closeWithoutEmit(){if(this.unbindTimeouts(),this.res)this.res.removeAllListeners(),this.res.destroy();if(this.req)this.req.removeAllListeners(),this.req.destroy()}close(){this.emit(v.ConnectionClosed),this.closeWithoutEmit()}destroy(){this.removeAllListeners(),this.close()}async clone(){let R=await new L1(this.requestData).makeRequestAsStream(),h=this.eventNames();for(let $ of h){let G=this.listeners($);for(let A of G)R.on($,A)}return R}async connect(f={}){if(typeof f.autoReconnect<"u")this.autoReconnect=f.autoReconnect;if(typeof f.autoReconnectRetries<"u")this.autoReconnectRetries=f.autoReconnectRetries==="unlimited"?1/0:f.autoReconnectRetries;if(typeof f.keepAliveTimeout<"u")this.keepAliveTimeoutMs=f.keepAliveTimeout==="disable"?1/0:f.keepAliveTimeout;if(typeof f.nextRetryTimeout<"u")this.nextRetryTimeout=f.nextRetryTimeout;this.unbindTimeouts();try{await this.reconnect()}catch(R){if(this.emit(v.ConnectError,0),this.emit(v.Error,{type:v.ConnectError,error:R,message:"Connect error - Initial connection just failed."}),this.autoReconnect)this.makeAutoReconnectRetry(0,R);else throw R}return this}async reconnect(){if(this.connectionProcessRunning)throw Error("Connection process is already running.");this.connectionProcessRunning=!0;try{let f=!0;if(this.req)f=!1,this.closeWithoutEmit();let{req:R,res:h,originalResponse:$}=await new L1(this.requestData).makeRequestAndResolveWhenReady();this.req=R,this.res=h,this.originalResponse=$,this.emit(f?v.Connected:v.Reconnected),this.parser.reset(),this.initEventsFromRequest()}finally{this.connectionProcessRunning=!1}}async onConnectionError(f=0){if(this.unbindTimeouts(),this.closeWithoutEmit(),!this.autoReconnect){this.emit(v.ConnectionClosed);return}if(f>=this.autoReconnectRetries){this.emit(v.ReconnectLimitExceeded),this.emit(v.ConnectionClosed);return}try{this.emit(v.ReconnectAttempt,f),await this.reconnect()}catch(R){this.emit(v.ReconnectError,f),this.emit(v.Error,{type:v.ReconnectError,error:R,message:`Reconnect error - ${f+1} attempts made yet.`}),this.makeAutoReconnectRetry(f,R)}}makeAutoReconnectRetry(f,R){let h=this.nextRetryTimeout(f+1,R);this.retryTimeout=setTimeout(()=>{this.onConnectionError(f+1)},h)}async*[Symbol.asyncIterator](){let f=new $7(this);try{while(!0){if(!this.req||this.req.aborted)throw Error("Connection closed");if(f.hasStack())yield*f.popStack();let{type:R,payload:h}=await f.nextEvent();if(R==="error")throw h}}finally{f.destroy()}}}var y$=A7;function W7(f){var R;if(!((R=f.clientSettings.plugins)===null||R===void 0?void 0:R.length))return!1;for(let h of f.clientSettings.plugins)if(h.onRequestError||h.onResponseError)return!0;return!1}async function F7(f,R,h,$){let G;if($ instanceof X1||$ instanceof S1)G=await this.applyPluginMethod("onRequestError",{client:this,url:this.getUrlObjectFromUrlString(f.url),params:f,computedParams:R,requestOptions:h,error:$});else if($ instanceof D1)G=await this.applyPluginMethod("onResponseError",{client:this,url:this.getUrlObjectFromUrlString(f.url),params:f,computedParams:R,requestOptions:h,error:$});if(G&&G instanceof z1)return G.value;return Promise.reject($)}import*as H7 from"crypto";class mf{constructor(f){this.nonceLength=32,this.consumerKeys=f.consumerKeys}static percentEncode(f){return encodeURIComponent(f).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")}hash(f,R){return H7.createHmac("sha1",R).update(f).digest("base64")}authorize(f,R={}){let h={oauth_consumer_key:this.consumerKeys.key,oauth_nonce:this.getNonce(),oauth_signature_method:"HMAC-SHA1",oauth_timestamp:this.getTimestamp(),oauth_version:"1.0"};if(R.key!==void 0)h.oauth_token=R.key;if(!f.data)f.data={};return h.oauth_signature=this.getSignature(f,R.secret,h),h}toHeader(f){let R=U7(f),h="OAuth ";for(let $ of R){if($.key.indexOf("oauth_")!==0)continue;h+=mf.percentEncode($.key)+'="'+mf.percentEncode($.value)+'",'}return{Authorization:h.slice(0,h.length-1)}}getNonce(){let R="";for(let h=0;h<this.nonceLength;h++)R+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[Math.trunc(Math.random()*62)];return R}getTimestamp(){return Math.trunc(new Date().getTime()/1000)}getSignature(f,R,h){return this.hash(this.getBaseString(f,h),this.getSigningKey(R))}getSigningKey(f){return mf.percentEncode(this.consumerKeys.secret)+"&"+mf.percentEncode(f||"")}getBaseString(f,R){return f.method.toUpperCase()+"&"+mf.percentEncode(this.getBaseUrl(f.url))+"&"+mf.percentEncode(this.getParameterString(f,R))}getParameterString(f,R){let h=U7(QD(N7(R,N7(f.data,zD(f.url))))),$="";for(let{key:G,value:A}of h)if(A&&Array.isArray(A)){A.sort();let W="";A.forEach((F,N)=>{if(W+=G+"="+F,N<A.length)W+="&"}),$+=W}else $+=G+"="+A+"&";return $.slice(0,$.length-1)}getBaseUrl(f){return f.split("?")[0]}}var I1=mf;function N7(f,R){return{...f||{},...R||{}}}function U7(f){return Object.keys(f).sort().map((R)=>({key:R,value:f[R]}))}function DD(f){let R=f.split("&"),h={};for(let $ of R){let[G,A=""]=$.split("=");if(h[G]){if(!Array.isArray(h[G]))h[G]=[h[G]];h[G].push(decodeURIComponent(A))}else h[G]=decodeURIComponent(A)}return h}function zD(f){let R=f.split("?");if(R.length===1)return{};return DD(R[1])}function QD(f){let R={};for(let h in f){let $=f[h];if($&&Array.isArray($))$=$.map((G)=>mf.percentEncode(G));else $=mf.percentEncode($);R[mf.percentEncode(h)]=$}return R}class cf{constructor(){this._boundary="",this._chunks=[]}bodyAppend(...f){let R=f.map((h)=>h instanceof Buffer?h:Buffer.from(h));this._chunks.push(...R)}append(f,R,h){let $=R instanceof Buffer?R:R.toString(),G=this.getMultipartHeader(f,$,h);this.bodyAppend(G,$,cf.LINE_BREAK)}getHeaders(){return{"content-type":"multipart/form-data; boundary="+this.getBoundary()}}getLength(){return this._chunks.reduce((f,R)=>f+R.length,this.getMultipartFooter().length)}getBuffer(){let f=[...this._chunks,this.getMultipartFooter()],R=Buffer.alloc(this.getLength()),h=0;for(let $ of f)for(let G=0;G<$.length;h++,G++)R[h]=$[G];return R}getBoundary(){if(!this._boundary)this.generateBoundary();return this._boundary}generateBoundary(){let f="--------------------------";for(let R=0;R<24;R++)f+=Math.floor(Math.random()*10).toString(16);this._boundary=f}getMultipartHeader(f,R,h){if(!h)h=R instanceof Buffer?cf.DEFAULT_CONTENT_TYPE:"";let $={"Content-Disposition":["form-data",`name="${f}"`],"Content-Type":h},G="";for(let[A,W]of Object.entries($)){if(!W.length)continue;G+=A+": "+v$(W).join("; ")+cf.LINE_BREAK}return"--"+this.getBoundary()+cf.LINE_BREAK+G+cf.LINE_BREAK}getMultipartFooter(){if(this._footerChunk)return this._footerChunk;return this._footerChunk=Buffer.from("--"+this.getBoundary()+"--"+cf.LINE_BREAK)}}cf.LINE_BREAK=`\r
77
77
  `;cf.DEFAULT_CONTENT_TYPE="application/octet-stream";class xG{static formatQueryToString(f){let R={};for(let h in f)if(typeof f[h]==="string")R[h]=f[h];else if(typeof f[h]<"u")R[h]=String(f[h]);return R}static autoDetectBodyType(f){if(f.pathname.startsWith("/2/")||f.pathname.startsWith("/labs/2/")){if(f.password.startsWith("/2/oauth2"))return"url";return"json"}if(f.hostname==="upload.x.com"){if(f.pathname==="/1.1/media/upload.json")return"form-data";return"json"}let R=f.pathname.split("/1.1/",2)[1];if(this.JSON_1_1_ENDPOINTS.has(R))return"json";return"url"}static addQueryParamsToUrl(f,R){let h=Object.entries(R);if(h.length){let $="";for(let[G,A]of h)$+=($.length?"&":"?")+`${I1.percentEncode(G)}=${I1.percentEncode(A)}`;f.search=$}}static constructBodyParams(f,R,h){if(f instanceof Buffer)return f;if(h==="json"){if(!R["content-type"])R["content-type"]="application/json;charset=UTF-8";return JSON.stringify(f)}else if(h==="url"){if(!R["content-type"])R["content-type"]="application/x-www-form-urlencoded;charset=UTF-8";if(Object.keys(f).length)return new URLSearchParams(f).toString().replace(/\*/g,"%2A");return""}else if(h==="raw")throw Error("You can only use raw body mode with Buffers. To give a string, use Buffer.from(str).");else{let $=new cf;for(let G in f)$.append(G,f[G]);if(!R["content-type"]){let G=$.getHeaders();R["content-type"]=G["content-type"]}return $.getBuffer()}}static setBodyLengthHeader(f,R){var h;if(f.headers=(h=f.headers)!==null&&h!==void 0?h:{},typeof R==="string")f.headers["content-length"]=Buffer.byteLength(R);else f.headers["content-length"]=R.length}static isOAuthSerializable(f){return!(f instanceof Buffer)}static mergeQueryAndBodyForOAuth(f,R){let h={};for(let $ in f)h[$]=f[$];if(this.isOAuthSerializable(R))for(let $ in R){let G=R[$];if(this.isOAuthSerializable(G))h[$]=typeof G==="object"&&G!==null&&"toString"in G?G.toString():G}return h}static moveUrlQueryParamsIntoObject(f,R){for(let[h,$]of f.searchParams)R[h]=$;return f.search="",f}static applyRequestParametersToUrl(f,R){return f.pathname=f.pathname.replace(/:([A-Z_-]+)/ig,(h,$)=>{if(R[$]!==void 0)return String(R[$]);return h}),f}}xG.JSON_1_1_ENDPOINTS=new Set(["direct_messages/events/new.json","direct_messages/welcome_messages/new.json","direct_messages/welcome_messages/rules/new.json","media/metadata/create.json","collections/entries/curate.json"]);var vf=xG;import*as Y7 from"crypto";class gR{static getCodeVerifier(){return this.generateRandomString(128)}static getCodeChallengeFromVerifier(f){return this.escapeBase64Url(Y7.createHash("sha256").update(f).digest("base64"))}static getAuthHeader(f,R){let h=encodeURIComponent(f)+":"+encodeURIComponent(R);return Buffer.from(h).toString("base64")}static generateRandomString(f){let R="",h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~";for(let $=0;$<f;$++)R+=h[Math.floor(Math.random()*h.length)];return R}static escapeBase64Url(f){return f.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}}class M0{constructor(f){if(this.rateLimits={},this.clientSettings={},f)this.clientSettings=f}getRateLimits(){return this.rateLimits}saveRateLimit(f,R){this.rateLimits[f]=R}async send(f){var R,h,$,G,A;if((R=this.clientSettings.plugins)===null||R===void 0?void 0:R.length){let X=await this.applyPreRequestConfigHooks(f);if(X)return X}let W=this.getHttpRequestArgs(f),F={method:W.method,headers:W.headers,timeout:f.timeout,agent:this.clientSettings.httpAgent},N=f.enableRateLimitSave!==!1;if(W.body)vf.setBodyLengthHeader(F,W.body);if((h=this.clientSettings.plugins)===null||h===void 0?void 0:h.length)await this.applyPreRequestHooks(f,W,F);let U=new L1({url:W.url,options:F,body:W.body,rateLimitSaver:N?this.saveRateLimit.bind(this,W.rawUrl):void 0,requestEventDebugHandler:f.requestEventDebugHandler,compression:(G=($=f.compression)!==null&&$!==void 0?$:this.clientSettings.compression)!==null&&G!==void 0?G:!0,forceParseMode:f.forceParseMode}).makeRequest();if(W7(this))U=this.applyResponseErrorHooks(f,W,F,U);let J=await U;if((A=this.clientSettings.plugins)===null||A===void 0?void 0:A.length){let X=await this.applyPostRequestHooks(f,W,F,J);if(X)return X.value}return J}sendStream(f){var R,h;if(this.clientSettings.plugins)this.applyPreStreamRequestConfigHooks(f);let $=this.getHttpRequestArgs(f),G={method:$.method,headers:$.headers,agent:this.clientSettings.httpAgent},A=f.enableRateLimitSave!==!1,W=f.autoConnect!==!1;if($.body)vf.setBodyLengthHeader(G,$.body);let F={url:$.url,options:G,body:$.body,rateLimitSaver:A?this.saveRateLimit.bind(this,$.rawUrl):void 0,payloadIsError:f.payloadIsError,compression:(h=(R=f.compression)!==null&&R!==void 0?R:this.clientSettings.compression)!==null&&h!==void 0?h:!0},N=new y$(F);if(!W)return N;return N.connect()}initializeToken(f){if(typeof f==="string")this.bearerToken=f;else if(typeof f==="object"&&"appKey"in f){if(this.consumerToken=f.appKey,this.consumerSecret=f.appSecret,f.accessToken&&f.accessSecret)this.accessToken=f.accessToken,this.accessSecret=f.accessSecret;this._oauth=this.buildOAuth()}else if(typeof f==="object"&&"username"in f){let R=encodeURIComponent(f.username)+":"+encodeURIComponent(f.password);this.basicToken=Buffer.from(R).toString("base64")}else if(typeof f==="object"&&"clientId"in f)this.clientId=f.clientId,this.clientSecret=f.clientSecret}getActiveTokens(){if(this.bearerToken)return{type:"oauth2",bearerToken:this.bearerToken};else if(this.basicToken)return{type:"basic",token:this.basicToken};else if(this.consumerSecret&&this._oauth)return{type:"oauth-1.0a",appKey:this.consumerToken,appSecret:this.consumerSecret,accessToken:this.accessToken,accessSecret:this.accessSecret};else if(this.clientId)return{type:"oauth2-user",clientId:this.clientId};return{type:"none"}}buildOAuth(){if(!this.consumerSecret||!this.consumerToken)throw Error("Invalid consumer tokens");return new I1({consumerKeys:{key:this.consumerToken,secret:this.consumerSecret}})}getOAuthAccessTokens(){if(!this.accessSecret||!this.accessToken)return;return{key:this.accessToken,secret:this.accessSecret}}getPlugins(){var f;return(f=this.clientSettings.plugins)!==null&&f!==void 0?f:[]}hasPlugins(){var f;return!!((f=this.clientSettings.plugins)===null||f===void 0?void 0:f.length)}async applyPluginMethod(f,R){var h;let $;for(let G of this.getPlugins()){let A=await((h=G[f])===null||h===void 0?void 0:h.call(G,R));if(A&&A instanceof z1)$=A}return $}writeAuthHeaders({headers:f,bodyInSignature:R,url:h,method:$,query:G,body:A}){if(f={...f},this.bearerToken)f.Authorization="Bearer "+this.bearerToken;else if(this.basicToken)f.Authorization="Basic "+this.basicToken;else if(this.clientId&&this.clientSecret)f.Authorization="Basic "+gR.getAuthHeader(this.clientId,this.clientSecret);else if(this.consumerSecret&&this._oauth){let W=R?vf.mergeQueryAndBodyForOAuth(G,A):G,F=this._oauth.authorize({url:h.toString(),method:$,data:W},this.getOAuthAccessTokens());f={...f,...this._oauth.toHeader(F)}}return f}getUrlObjectFromUrlString(f){if(!f.startsWith("http"))f="https://"+f;return new URL(f)}getHttpRequestArgs({url:f,method:R,query:h={},body:$={},headers:G,forceBodyMode:A,enableAuth:W,params:F}){let N=void 0;if(R=R.toUpperCase(),G=G!==null&&G!==void 0?G:{},!G["x-user-agent"])G["x-user-agent"]="Node.twitter-api-v2";let U=this.getUrlObjectFromUrlString(f),J=U.origin+U.pathname;if(F)vf.applyRequestParametersToUrl(U,F);let X=vf.formatQueryToString(h);if(vf.moveUrlQueryParamsIntoObject(U,X),!($ instanceof Buffer))f7($);let z=A!==null&&A!==void 0?A:vf.autoDetectBodyType(U);if(W!==!1){let S=M0.BODY_METHODS.has(R)&&z==="url";G=this.writeAuthHeaders({headers:G,bodyInSignature:S,method:R,query:X,url:U,body:$})}if(M0.BODY_METHODS.has(R))N=vf.constructBodyParams($,G,z)||void 0;return vf.addQueryParamsToUrl(U,X),{rawUrl:J,url:U,method:R,headers:G,body:N}}async applyPreRequestConfigHooks(f){var R;let h=this.getUrlObjectFromUrlString(f.url);for(let $ of this.getPlugins()){let G=await((R=$.onBeforeRequestConfig)===null||R===void 0?void 0:R.call($,{client:this,url:h,params:f}));if(G)return G}}applyPreStreamRequestConfigHooks(f){var R;let h=this.getUrlObjectFromUrlString(f.url);for(let $ of this.getPlugins())(R=$.onBeforeStreamRequestConfig)===null||R===void 0||R.call($,{client:this,url:h,params:f})}async applyPreRequestHooks(f,R,h){await this.applyPluginMethod("onBeforeRequest",{client:this,url:this.getUrlObjectFromUrlString(f.url),params:f,computedParams:R,requestOptions:h})}async applyPostRequestHooks(f,R,h,$){return await this.applyPluginMethod("onAfterRequest",{client:this,url:this.getUrlObjectFromUrlString(f.url),params:f,computedParams:R,requestOptions:h,response:$})}applyResponseErrorHooks(f,R,h,$){return $.catch(F7.bind(this,f,R,h))}}M0.BODY_METHODS=new Set(["POST","PUT","PATCH"]);class MR{constructor(f,R={}){if(this._currentUser=null,this._currentUserV2=null,f instanceof MR)this._requestMaker=f._requestMaker;else this._requestMaker=new M0(R),this._requestMaker.initializeToken(f)}setPrefix(f){this._prefix=f}cloneWithPrefix(f){let R=this.constructor(this);return R.setPrefix(f),R}getActiveTokens(){return this._requestMaker.getActiveTokens()}getPlugins(){return this._requestMaker.getPlugins()}getPluginOfType(f){return this.getPlugins().find((R)=>R instanceof f)}hasHitRateLimit(f){var R;if(this.isRateLimitStatusObsolete(f))return!1;return((R=this.getLastRateLimitStatus(f))===null||R===void 0?void 0:R.remaining)===0}isRateLimitStatusObsolete(f){let R=this.getLastRateLimitStatus(f);if(R===void 0)return!0;return R.reset*1000<Date.now()}getLastRateLimitStatus(f){let R=f.match(/^https?:\/\//)?f:this._prefix+f;return this._requestMaker.getRateLimits()[R]}getCurrentUserObject(f=!1){if(!f&&this._currentUser){if(this._currentUser.value)return Promise.resolve(this._currentUser.value);return this._currentUser.promise}return this._currentUser=cG(()=>this.get("account/verify_credentials.json",{tweet_mode:"extended"},{prefix:ZR})),this._currentUser.promise}getCurrentUserV2Object(f=!1){if(!f&&this._currentUserV2){if(this._currentUserV2.value)return Promise.resolve(this._currentUserV2.value);return this._currentUserV2.promise}return this._currentUserV2=cG(()=>this.get("users/me",void 0,{prefix:YR})),this._currentUserV2.promise}async get(f,R={},{fullResponse:h,prefix:$=this._prefix,...G}={}){if($)f=$+f;let A=await this._requestMaker.send({url:f,method:"GET",query:R,...G});return h?A:A.data}async delete(f,R={},{fullResponse:h,prefix:$=this._prefix,...G}={}){if($)f=$+f;let A=await this._requestMaker.send({url:f,method:"DELETE",query:R,...G});return h?A:A.data}async post(f,R,{fullResponse:h,prefix:$=this._prefix,...G}={}){if($)f=$+f;let A=await this._requestMaker.send({url:f,method:"POST",body:R,...G});return h?A:A.data}async put(f,R,{fullResponse:h,prefix:$=this._prefix,...G}={}){if($)f=$+f;let A=await this._requestMaker.send({url:f,method:"PUT",body:R,...G});return h?A:A.data}async patch(f,R,{fullResponse:h,prefix:$=this._prefix,...G}={}){if($)f=$+f;let A=await this._requestMaker.send({url:f,method:"PATCH",body:R,...G});return h?A:A.data}getStream(f,R,{prefix:h=this._prefix,...$}={}){return this._requestMaker.sendStream({url:h?h+f:f,method:"GET",query:R,...$})}postStream(f,R,{prefix:h=this._prefix,...$}={}){return this._requestMaker.sendStream({url:h?h+f:f,method:"POST",body:R,...$})}}class jf extends MR{constructor(f){if(!(f instanceof MR))throw Error("You must instance SubTwitterApi instance from existing TwitterApi instance.");super(f)}}class X0 extends J0{constructor(){super(...arguments);this.hasFinishedFetch=!1}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.push(...h),this.hasFinishedFetch=h.length===0}getNextQueryParams(f){let R=BigInt(this._realData[this._realData.length-1].id_str);return{...this.injectQueryParams(f),max_id:(R-BigInt(1)).toString()}}getPageLengthFromRequest(f){return f.data.length}isFetchLastOver(f){return!f.data.length}canFetchNextPage(f){return f.length>0}getItemArray(){return this.tweets}get tweets(){return this._realData}get done(){return super.done||this.hasFinishedFetch}}class kG extends X0{constructor(){super(...arguments);this._endpoint="statuses/home_timeline.json"}}class lG extends X0{constructor(){super(...arguments);this._endpoint="statuses/mentions_timeline.json"}}class V$ extends X0{constructor(){super(...arguments);this._endpoint="statuses/user_timeline.json"}}class sG extends X0{constructor(){super(...arguments);this._endpoint="lists/statuses.json"}}class E$ extends X0{constructor(){super(...arguments);this._endpoint="favorites/list.json"}}class _G extends Ff{constructor(){super(...arguments);this._endpoint="mutes/users/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.users.push(...h.users),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.users.length}getItemArray(){return this.users}get users(){return this._realData.users}}class dG extends Ff{constructor(){super(...arguments);this._endpoint="mutes/users/ids.json",this._maxResultsWhenFetchLast=5000}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.ids.push(...h.ids),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.ids.length}getItemArray(){return this.ids}get ids(){return this._realData.ids}}class aG extends Ff{constructor(){super(...arguments);this._endpoint="followers/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.users.push(...h.users),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.users.length}getItemArray(){return this.users}get users(){return this._realData.users}}class iG extends Ff{constructor(){super(...arguments);this._endpoint="followers/ids.json",this._maxResultsWhenFetchLast=5000}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.ids.push(...h.ids),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.ids.length}getItemArray(){return this.ids}get ids(){return this._realData.ids}}class rG extends Ff{constructor(){super(...arguments);this._endpoint="friends/list.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.users.push(...h.users),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.users.length}getItemArray(){return this.users}get users(){return this._realData.users}}class pG extends Ff{constructor(){super(...arguments);this._endpoint="friends/ids.json",this._maxResultsWhenFetchLast=5000}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.ids.push(...h.ids),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.ids.length}getItemArray(){return this.ids}get ids(){return this._realData.ids}}class oG extends J0{constructor(){super(...arguments);this._endpoint="users/search.json"}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.push(...h)}getNextQueryParams(f){var R;let h=Number((R=this._queryParams.page)!==null&&R!==void 0?R:"1");return{...this._queryParams,page:h+1,...f?{count:f}:{}}}getPageLengthFromRequest(f){return f.data.length}isFetchLastOver(f){return!f.data.length}canFetchNextPage(f){return f.length>0}getItemArray(){return this.users}get users(){return this._realData}}class T$ extends Ff{constructor(){super(...arguments);this._endpoint="friendships/incoming.json",this._maxResultsWhenFetchLast=5000}refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.ids.push(...h.ids),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.ids.length}getItemArray(){return this.ids}get ids(){return this._realData.ids}}class nG extends T${constructor(){super(...arguments);this._endpoint="friendships/outgoing.json"}}class g$ extends Ff{refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.lists.push(...h.lists),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.lists.length}getItemArray(){return this.lists}get lists(){return this._realData.lists}}class uG extends g${constructor(){super(...arguments);this._endpoint="lists/memberships.json"}}class eG extends g${constructor(){super(...arguments);this._endpoint="lists/ownerships.json"}}class tG extends g${constructor(){super(...arguments);this._endpoint="lists/subscriptions.json"}}class fA extends Ff{refreshInstanceFromResult(f,R){let h=f.data;if(this._rateLimit=f.rateLimit,R)this._realData.users.push(...h.users),this._realData.next_cursor=h.next_cursor}getPageLengthFromRequest(f){return f.data.users.length}getItemArray(){return this.users}get users(){return this._realData.users}}class RA extends fA{constructor(){super(...arguments);this._endpoint="lists/members.json"}}class hA extends fA{constructor(){super(...arguments);this._endpoint="lists/subscribers.json"}}class S0 extends jf{constructor(){super(...arguments);this._prefix=ZR}singleTweet(f,R={}){return this.get("statuses/show.json",{tweet_mode:"extended",id:f,...R})}tweets(f,R={}){return this.post("statuses/lookup.json",{tweet_mode:"extended",id:f,...R})}oembedTweet(f,R={}){return this.get("oembed",{url:`https://x.com/i/statuses/${f}`,...R},{prefix:"https://publish.x.com/"})}async homeTimeline(f={}){let R={tweet_mode:"extended",...f},h=await this.get("statuses/home_timeline.json",R,{fullResponse:!0});return new kG({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async mentionTimeline(f={}){let R={tweet_mode:"extended",...f},h=await this.get("statuses/mentions_timeline.json",R,{fullResponse:!0});return new lG({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async userTimeline(f,R={}){let h={tweet_mode:"extended",user_id:f,...R},$=await this.get("statuses/user_timeline.json",h,{fullResponse:!0});return new V$({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}async userTimelineByUsername(f,R={}){let h={tweet_mode:"extended",screen_name:f,...R},$=await this.get("statuses/user_timeline.json",h,{fullResponse:!0});return new V$({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}async favoriteTimeline(f,R={}){let h={tweet_mode:"extended",user_id:f,...R},$=await this.get("favorites/list.json",h,{fullResponse:!0});return new E$({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}async favoriteTimelineByUsername(f,R={}){let h={tweet_mode:"extended",screen_name:f,...R},$=await this.get("favorites/list.json",h,{fullResponse:!0});return new E$({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}user(f){return this.get("users/show.json",{tweet_mode:"extended",...f})}users(f){return this.get("users/lookup.json",{tweet_mode:"extended",...f})}verifyCredentials(f={}){return this.get("account/verify_credentials.json",f)}async listMutedUsers(f={}){let R={tweet_mode:"extended",...f},h=await this.get("mutes/users/list.json",R,{fullResponse:!0});return new _G({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async listMutedUserIds(f={}){let R={stringify_ids:!0,...f},h=await this.get("mutes/users/ids.json",R,{fullResponse:!0});return new dG({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async userFriendList(f={}){let R={...f},h=await this.get("friends/list.json",R,{fullResponse:!0});return new rG({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async userFollowerList(f={}){let R={...f},h=await this.get("followers/list.json",R,{fullResponse:!0});return new aG({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async userFollowerIds(f={}){let R={stringify_ids:!0,...f},h=await this.get("followers/ids.json",R,{fullResponse:!0});return new iG({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async userFollowingIds(f={}){let R={stringify_ids:!0,...f},h=await this.get("friends/ids.json",R,{fullResponse:!0});return new pG({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async searchUsers(f,R={}){let h={q:f,tweet_mode:"extended",page:1,...R},$=await this.get("users/search.json",h,{fullResponse:!0});return new oG({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}friendship(f){return this.get("friendships/show.json",f)}friendships(f){return this.get("friendships/lookup.json",f)}friendshipsNoRetweets(){return this.get("friendships/no_retweets/ids.json",{stringify_ids:!0})}async friendshipsIncoming(f={}){let R={stringify_ids:!0,...f},h=await this.get("friendships/incoming.json",R,{fullResponse:!0});return new T$({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async friendshipsOutgoing(f={}){let R={stringify_ids:!0,...f},h=await this.get("friendships/outgoing.json",R,{fullResponse:!0});return new nG({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}accountSettings(){return this.get("account/settings.json")}userProfileBannerSizes(f){return this.get("users/profile_banner.json",f)}list(f){return this.get("lists/show.json",{tweet_mode:"extended",...f})}lists(f={}){return this.get("lists/list.json",{tweet_mode:"extended",...f})}async listMembers(f={}){let R={tweet_mode:"extended",...f},h=await this.get("lists/members.json",R,{fullResponse:!0});return new RA({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}listGetMember(f){return this.get("lists/members/show.json",{tweet_mode:"extended",...f})}async listMemberships(f={}){let R={tweet_mode:"extended",...f},h=await this.get("lists/memberships.json",R,{fullResponse:!0});return new uG({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async listOwnerships(f={}){let R={tweet_mode:"extended",...f},h=await this.get("lists/ownerships.json",R,{fullResponse:!0});return new eG({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async listStatuses(f){let R={tweet_mode:"extended",...f},h=await this.get("lists/statuses.json",R,{fullResponse:!0});return new sG({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}async listSubscribers(f={}){let R={tweet_mode:"extended",...f},h=await this.get("lists/subscribers.json",R,{fullResponse:!0});return new hA({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}listGetSubscriber(f){return this.get("lists/subscribers/show.json",{tweet_mode:"extended",...f})}async listSubscriptions(f={}){let R={tweet_mode:"extended",...f},h=await this.get("lists/subscriptions.json",R,{fullResponse:!0});return new tG({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}mediaInfo(f){return this.get("media/upload.json",{command:"STATUS",media_id:f},{prefix:pf})}filterStream({autoConnect:f,...R}={}){let h={};for(let[G,A]of Object.entries(R))if(G==="follow"||G==="track")h[G]=A.toString();else if(G==="locations"){let W=A;h.locations=v$(W).map((F)=>`${F.lng},${F.lat}`).join(",")}else h[G]=A;return this.stream.postStream("statuses/filter.json",h,{autoConnect:f})}sampleStream({autoConnect:f,...R}={}){return this.stream.getStream("statuses/sample.json",R,{autoConnect:f})}get stream(){let f=new C$(this);return f.setPrefix(uH),f}trendsByPlace(f,R={}){return this.get("trends/place.json",{id:f,...R})}trendsAvailable(){return this.get("trends/available.json")}trendsClosest(f,R){return this.get("trends/closest.json",{lat:f,long:R})}geoPlace(f){return this.get("geo/id/:place_id.json",void 0,{params:{place_id:f}})}geoSearch(f){return this.get("geo/search.json",f)}geoReverseGeoCode(f){return this.get("geo/reverse_geocode.json",f)}rateLimitStatuses(...f){return this.get("application/rate_limit_status.json",{resources:f})}supportedLanguages(){return this.get("help/languages.json")}}import*as XR from"fs";async function $A(f){let R=await GA(f);if(typeof R==="number")return new Promise((h,$)=>{XR.readFile(R,(G,A)=>{if(G)return $(G);h(A)})});else if(R instanceof Buffer)return R;else return R.readFile()}function GA(f){if(typeof f==="string")return XR.promises.open(f,"r");else if(typeof f==="number")return f;else if(typeof f==="object"&&!(f instanceof Buffer))return f;else if(!(f instanceof Buffer))throw Error("Given file is not valid, please check its type.");else return f}async function Z7(f){if(typeof f==="number")return(await new Promise((h,$)=>{XR.fstat(f,(G,A)=>{if(G)$(G);h(A)})})).size;else if(f instanceof Buffer)return f.length;else return(await f.stat()).size}function J7(f,R,h){if(typeof h==="string")return h;else if(typeof f==="string"&&!R)return LD(f);else if(typeof R==="string")return ID(R);throw Error("You must specify type if file is a file handle or Buffer.")}function LD(f){if(f.endsWith(".jpeg")||f.endsWith(".jpg"))return d.Jpeg;if(f.endsWith(".png"))return d.Png;if(f.endsWith(".webp"))return d.Webp;if(f.endsWith(".gif"))return d.Gif;if(f.endsWith(".mpeg4")||f.endsWith(".mp4"))return d.Mp4;if(f.endsWith(".mov")||f.endsWith(".mov"))return d.Mov;if(f.endsWith(".srt"))return d.Srt;return bG({instance:"TwitterApiv1ReadWrite",method:"uploadMedia",problem:"options.mimeType is missing and filename couldn't help to resolve MIME type, so it will fallback to image/jpeg",resolution:"If you except to give filenames without extensions, please specify explicitlty the MIME type using options.mimeType"}),d.Jpeg}function ID(f){if(bG({instance:"TwitterApiv1ReadWrite",method:"uploadMedia",problem:"you're using options.type",resolution:"Remove options.type argument and migrate to options.mimeType which takes the real MIME type. If you're using type=longmp4, add options.longVideo alongside of mimeType=EUploadMimeType.Mp4"}),f==="gif")return d.Gif;if(f==="jpg")return d.Jpeg;if(f==="png")return d.Png;if(f==="webp")return d.Webp;if(f==="srt")return d.Srt;if(f==="mp4"||f==="longmp4")return d.Mp4;if(f==="mov")return d.Mov;return f}function M7(f,R){if(f===d.Mp4||f===d.Mov)return R==="tweet"?"TweetVideo":"DmVideo";if(f===d.Gif)return R==="tweet"?"TweetGif":"DmGif";if(f===d.Srt)return"Subtitles";else return R==="tweet"?"TweetImage":"DmImage"}function AA(f){return new Promise((R)=>setTimeout(R,f*1000))}async function WA(f,R,h=0,$){if(f instanceof Buffer){let A=f.slice(h,h+R);return[A,A.length]}if(!$)throw Error("Well, we will need a buffer to store file content.");let G;if(typeof f==="number")G=await new Promise((A,W)=>{XR.read(f,$,0,R,h,(F,N)=>{if(F)W(F);A(N)})});else G=(await f.read($,0,R,h)).bytesRead;return[$,G]}var FA="media/upload.json";class D0 extends S0{constructor(){super(...arguments);this._prefix=ZR}get readOnly(){return this}tweet(f,R={}){let h={status:f,tweet_mode:"extended",...R};return this.post("statuses/update.json",h)}async quote(f,R,h={}){let $="https://x.com/i/statuses/"+R;return this.tweet(f,{...h,attachment_url:$})}async tweetThread(f){let R=[];for(let h of f){let $=R.length?R[R.length-1]:null,G={...typeof h==="string"?{status:h}:h},A=$?$.id_str:G.in_reply_to_status_id,W=G.status;if(A)R.push(await this.reply(W,A,G));else R.push(await this.tweet(W,G))}return R}reply(f,R,h={}){return this.tweet(f,{auto_populate_reply_metadata:!0,in_reply_to_status_id:R,...h})}deleteTweet(f){return this.post("statuses/destroy/:id.json",{tweet_mode:"extended"},{params:{id:f}})}reportUserAsSpam(f){return this.post("users/report_spam.json",{tweet_mode:"extended",...f})}updateFriendship(f){return this.post("friendships/update.json",f)}createFriendship(f){return this.post("friendships/create.json",f)}destroyFriendship(f){return this.post("friendships/destroy.json",f)}updateAccountSettings(f){return this.post("account/settings.json",f)}updateAccountProfile(f){return this.post("account/update_profile.json",f)}async updateAccountProfileBanner(f,R={}){let h={banner:await $A(f),...R};return this.post("account/update_profile_banner.json",h,{forceBodyMode:"form-data"})}async updateAccountProfileImage(f,R={}){let h={tweet_mode:"extended",image:await $A(f),...R};return this.post("account/update_profile_image.json",h,{forceBodyMode:"form-data"})}removeAccountProfileBanner(){return this.post("account/remove_profile_banner.json")}createList(f){return this.post("lists/create.json",{tweet_mode:"extended",...f})}updateList(f){return this.post("lists/update.json",{tweet_mode:"extended",...f})}removeList(f){return this.post("lists/destroy.json",{tweet_mode:"extended",...f})}addListMembers(f){let h=f.user_id&&Q1(f.user_id)||f.screen_name&&Q1(f.screen_name)?"lists/members/create_all.json":"lists/members/create.json";return this.post(h,f)}removeListMembers(f){let h=f.user_id&&Q1(f.user_id)||f.screen_name&&Q1(f.screen_name)?"lists/members/destroy_all.json":"lists/members/destroy.json";return this.post(h,f)}subscribeToList(f){return this.post("lists/subscribers/create.json",{tweet_mode:"extended",...f})}unsubscribeOfList(f){return this.post("lists/subscribers/destroy.json",{tweet_mode:"extended",...f})}createMediaMetadata(f,R){return this.post("media/metadata/create.json",{media_id:f,...R},{prefix:pf,forceBodyMode:"json"})}createMediaSubtitles(f,R){return this.post("media/subtitles/create.json",{media_id:f,media_category:"TweetVideo",subtitle_info:{subtitles:R}},{prefix:pf,forceBodyMode:"json"})}deleteMediaSubtitles(f,...R){return this.post("media/subtitles/delete.json",{media_id:f,media_category:"TweetVideo",subtitle_info:{subtitles:R.map((h)=>({language_code:h}))}},{prefix:pf,forceBodyMode:"json"})}async uploadMedia(f,R={},h=!1){var $;let G=($=R.chunkLength)!==null&&$!==void 0?$:1048576,{fileHandle:A,mediaCategory:W,fileSize:F,mimeType:N}=await this.getUploadMediaRequirements(f,R);try{let U=await this.post(FA,{command:"INIT",total_bytes:F,media_type:N,media_category:W,additional_owners:R.additionalOwners,shared:R.shared?!0:void 0},{prefix:pf});await this.mediaChunkedUpload(A,G,U.media_id_string,R.maxConcurrentUploads);let J=await this.post(FA,{command:"FINALIZE",media_id:U.media_id_string},{prefix:pf});if(J.processing_info&&J.processing_info.state!=="succeeded")await this.awaitForMediaProcessingCompletion(J);if(h)return J;else return J.media_id_string}finally{if(typeof f==="number")NA.close(f,()=>{});else if(typeof A==="object"&&!(A instanceof Buffer))A.close()}}async awaitForMediaProcessingCompletion(f){var R;while(!0){f=await this.mediaInfo(f.media_id_string);let{processing_info:h}=f;if(!h||h.state==="succeeded")return;if((R=h.error)===null||R===void 0?void 0:R.code){let{name:$,message:G}=h.error;throw Error(`Failed to process media: ${$} - ${G}.`)}if(h.state==="failed")throw Error("Failed to process the media.");if(h.check_after_secs)await AA(h.check_after_secs);else await AA(5)}}async getUploadMediaRequirements(f,{mimeType:R,type:h,target:$,longVideo:G}={}){let A;try{A=await GA(f);let W=J7(f,h,R),F;if(W===d.Mp4&&(!R&&!h&&$!=="dm"||G))F="amplify_video";else F=M7(W,$!==null&&$!==void 0?$:"tweet");return{fileHandle:A,mediaCategory:F,fileSize:await Z7(A),mimeType:W}}catch(W){if(typeof f==="number")NA.close(f,()=>{});else if(typeof A==="object"&&!(A instanceof Buffer))A.close();throw W}}async mediaChunkedUpload(f,R,h,$=3){let G=0;if($<1)throw RangeError("Bad maxConcurrentUploads parameter.");let A=f instanceof Buffer?void 0:Buffer.alloc(R),W,F,N=0;[W,F]=await WA(f,R,N,A),N+=F;let U=new Set;while(F){let J=W.slice(0,F);if(J.length){let X=this.post(FA,{command:"APPEND",media_id:h,segment_index:G,media:J},{prefix:pf});U.add(X),X.then(()=>{U.delete(X)}),G++}if(U.size>=$)await Promise.race(U);[W,F]=await WA(f,R,N,A),N+=F}await Promise.all([...U])}}class X7 extends D0{constructor(){super(...arguments);this._prefix=ZR}get readWrite(){return this}sendDm({recipient_id:f,custom_profile_id:R,...h}){let $={event:{type:JR.Create,[JR.Create]:{target:{recipient_id:f},message_data:h}}};if(R)$.event[JR.Create].custom_profile_id=R;return this.post("direct_messages/events/new.json",$,{forceBodyMode:"json"})}getDmEvent(f){return this.get("direct_messages/events/show.json",{id:f})}deleteDm(f){return this.delete("direct_messages/events/destroy.json",{id:f})}async listDmEvents(f={}){let R={...f},h=await this.get("direct_messages/events/list.json",R,{fullResponse:!0});return new CG({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}newWelcomeDm(f,R){let h={[JR.WelcomeCreate]:{name:f,message_data:R}};return this.post("direct_messages/welcome_messages/new.json",h,{forceBodyMode:"json"})}getWelcomeDm(f){return this.get("direct_messages/welcome_messages/show.json",{id:f})}deleteWelcomeDm(f){return this.delete("direct_messages/welcome_messages/destroy.json",{id:f})}updateWelcomeDm(f,R){let h={message_data:R};return this.put("direct_messages/welcome_messages/update.json",h,{forceBodyMode:"json",query:{id:f}})}async listWelcomeDms(f={}){let R={...f},h=await this.get("direct_messages/welcome_messages/list.json",R,{fullResponse:!0});return new mG({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R})}newWelcomeDmRule(f){return this.post("direct_messages/welcome_messages/rules/new.json",{welcome_message_rule:{welcome_message_id:f}},{forceBodyMode:"json"})}getWelcomeDmRule(f){return this.get("direct_messages/welcome_messages/rules/show.json",{id:f})}deleteWelcomeDmRule(f){return this.delete("direct_messages/welcome_messages/rules/destroy.json",{id:f})}async listWelcomeDmRules(f={}){let R={...f};return this.get("direct_messages/welcome_messages/rules/list.json",R)}async setWelcomeDm(f,R=!0){var h;let $=await this.listWelcomeDmRules();if((h=$.welcome_message_rules)===null||h===void 0?void 0:h.length){for(let G of $.welcome_message_rules)if(await this.deleteWelcomeDmRule(G.id),R)await this.deleteWelcomeDm(G.welcome_message_id)}return this.newWelcomeDmRule(f)}markDmAsRead(f,R){return this.post("direct_messages/mark_read.json",{last_read_event_id:f,recipient_id:R},{forceBodyMode:"url"})}indicateDmTyping(f){return this.post("direct_messages/indicate_typing.json",{recipient_id:f},{forceBodyMode:"url"})}async downloadDmImage(f){if(typeof f!=="string"){let h=f[JR.Create].message_data.attachment;if(!h)throw Error("The given direct message doesn't contain any attachment");f=h.media.media_url_https}let R=await this.get(f,void 0,{forceParseMode:"buffer",prefix:""});if(!R.length)throw Error("Image not found. Make sure you are logged with credentials able to access direct messages, and check the URL.");return R}}var C$=X7;class _{constructor(f){this.result=f}get tweets(){return _.tweets(this.result)}static tweets(f){var R,h;return(h=(R=f.includes)===null||R===void 0?void 0:R.tweets)!==null&&h!==void 0?h:[]}tweetById(f){return _.tweetById(this.result,f)}static tweetById(f,R){return this.tweets(f).find((h)=>h.id===R)}retweet(f){return _.retweet(this.result,f)}static retweet(f,R){var h;let $=((h=R.referenced_tweets)!==null&&h!==void 0?h:[]).filter((G)=>G.type==="retweeted").map((G)=>G.id);return this.tweets(f).find((G)=>$.includes(G.id))}quote(f){return _.quote(this.result,f)}static quote(f,R){var h;let $=((h=R.referenced_tweets)!==null&&h!==void 0?h:[]).filter((G)=>G.type==="quoted").map((G)=>G.id);return this.tweets(f).find((G)=>$.includes(G.id))}repliedTo(f){return _.repliedTo(this.result,f)}static repliedTo(f,R){var h;let $=((h=R.referenced_tweets)!==null&&h!==void 0?h:[]).filter((G)=>G.type==="replied_to").map((G)=>G.id);return this.tweets(f).find((G)=>$.includes(G.id))}author(f){return _.author(this.result,f)}static author(f,R){let h=R.author_id;return h?this.users(f).find(($)=>$.id===h):void 0}repliedToAuthor(f){return _.repliedToAuthor(this.result,f)}static repliedToAuthor(f,R){let h=R.in_reply_to_user_id;return h?this.users(f).find(($)=>$.id===h):void 0}get users(){return _.users(this.result)}static users(f){var R,h;return(h=(R=f.includes)===null||R===void 0?void 0:R.users)!==null&&h!==void 0?h:[]}userById(f){return _.userById(this.result,f)}static userById(f,R){return this.users(f).find((h)=>h.id===R)}pinnedTweet(f){return _.pinnedTweet(this.result,f)}static pinnedTweet(f,R){return R.pinned_tweet_id?this.tweets(f).find((h)=>h.id===R.pinned_tweet_id):void 0}get media(){return _.media(this.result)}static media(f){var R,h;return(h=(R=f.includes)===null||R===void 0?void 0:R.media)!==null&&h!==void 0?h:[]}medias(f){return _.medias(this.result,f)}static medias(f,R){var h,$;let G=($=(h=R.attachments)===null||h===void 0?void 0:h.media_keys)!==null&&$!==void 0?$:[];return this.media(f).filter((A)=>G.includes(A.media_key))}get polls(){return _.polls(this.result)}static polls(f){var R,h;return(h=(R=f.includes)===null||R===void 0?void 0:R.polls)!==null&&h!==void 0?h:[]}poll(f){return _.poll(this.result,f)}static poll(f,R){var h,$;let G=($=(h=R.attachments)===null||h===void 0?void 0:h.poll_ids)!==null&&$!==void 0?$:[];if(G.length){let A=G[0];return this.polls(f).find((W)=>W.id===A)}return}get places(){return _.places(this.result)}static places(f){var R,h;return(h=(R=f.includes)===null||R===void 0?void 0:R.places)!==null&&h!==void 0?h:[]}place(f){return _.place(this.result,f)}static place(f,R){var h;let $=(h=R.geo)===null||h===void 0?void 0:h.place_id;return $?this.places(f).find((G)=>G.id===$):void 0}listOwner(f){return _.listOwner(this.result,f)}static listOwner(f,R){let h=R.owner_id;return h?this.users(f).find(($)=>$.id===h):void 0}spaceCreator(f){return _.spaceCreator(this.result,f)}static spaceCreator(f,R){let h=R.creator_id;return h?this.users(f).find(($)=>$.id===h):void 0}spaceHosts(f){return _.spaceHosts(this.result,f)}static spaceHosts(f,R){var h;let $=(h=R.host_ids)!==null&&h!==void 0?h:[];return this.users(f).filter((G)=>$.includes(G.id))}spaceSpeakers(f){return _.spaceSpeakers(this.result,f)}static spaceSpeakers(f,R){var h;let $=(h=R.speaker_ids)!==null&&h!==void 0?h:[];return this.users(f).filter((G)=>$.includes(G.id))}spaceInvitedUsers(f){return _.spaceInvitedUsers(this.result,f)}static spaceInvitedUsers(f,R){var h;let $=(h=R.invited_user_ids)!==null&&h!==void 0?h:[];return this.users(f).filter((G)=>$.includes(G.id))}}class m$ extends gG{updateIncludes(f){if(f.errors){if(!this._realData.errors)this._realData.errors=[];this._realData.errors=[...this._realData.errors,...f.errors]}if(!f.includes)return;if(!this._realData.includes)this._realData.includes={};let R=this._realData.includes;for(let[h,$]of Object.entries(f.includes)){if(!R[h])R[h]=[];R[h]=[...R[h],...$]}}assertUsable(){if(this.unusable)throw Error("Unable to use this paginator to fetch more data, as it does not contain any metadata. Check .errors property for more details.")}get meta(){return this._realData.meta}get includes(){var f;if(!((f=this._realData)===null||f===void 0?void 0:f.includes))return new _(this._realData);if(this._includesInstance)return this._includesInstance;return this._includesInstance=new _(this._realData)}get errors(){var f;return(f=this._realData.errors)!==null&&f!==void 0?f:[]}get unusable(){return this.errors.length>0&&!this._realData.meta&&!this._realData.data}}class _f extends m${refreshInstanceFromResult(f,R){var h;let $=f.data,G=(h=$.data)!==null&&h!==void 0?h:[];if(this._rateLimit=f.rateLimit,!this._realData.data)this._realData.data=[];if(R)this._realData.meta.result_count+=$.meta.result_count,this._realData.meta.next_token=$.meta.next_token,this._realData.data.push(...G);else this._realData.meta.result_count+=$.meta.result_count,this._realData.meta.previous_token=$.meta.previous_token,this._realData.data.unshift(...G);this.updateIncludes($)}getNextQueryParams(f){return this.assertUsable(),{...this.injectQueryParams(f),pagination_token:this._realData.meta.next_token}}getPreviousQueryParams(f){return this.assertUsable(),{...this.injectQueryParams(f),pagination_token:this._realData.meta.previous_token}}getPageLengthFromRequest(f){var R,h;return(h=(R=f.data.data)===null||R===void 0?void 0:R.length)!==null&&h!==void 0?h:0}isFetchLastOver(f){var R;return!((R=f.data.data)===null||R===void 0?void 0:R.length)||!this.canFetchNextPage(f.data)}canFetchNextPage(f){var R;return!!((R=f.meta)===null||R===void 0?void 0:R.next_token)}}class UA extends m${refreshInstanceFromResult(f,R){var h;let $=f.data,G=(h=$.data)!==null&&h!==void 0?h:[];if(this._rateLimit=f.rateLimit,!this._realData.data)this._realData.data=[];if(R)this._realData.meta.oldest_id=$.meta.oldest_id,this._realData.meta.result_count+=$.meta.result_count,this._realData.meta.next_token=$.meta.next_token,this._realData.data.push(...G);else this._realData.meta.newest_id=$.meta.newest_id,this._realData.meta.result_count+=$.meta.result_count,this._realData.data.unshift(...G);this.updateIncludes($)}getNextQueryParams(f){this.assertUsable();let R={...this.injectQueryParams(f)};if(this._realData.meta.next_token)R.next_token=this._realData.meta.next_token;else{if(R.start_time)R.since_id=this.dateStringToSnowflakeId(R.start_time),delete R.start_time;if(R.end_time)delete R.end_time;R.until_id=this._realData.meta.oldest_id}return R}getPreviousQueryParams(f){return this.assertUsable(),{...this.injectQueryParams(f),since_id:this._realData.meta.newest_id}}getPageLengthFromRequest(f){var R,h;return(h=(R=f.data.data)===null||R===void 0?void 0:R.length)!==null&&h!==void 0?h:0}isFetchLastOver(f){var R;return!((R=f.data.data)===null||R===void 0?void 0:R.length)||!this.canFetchNextPage(f.data)}canFetchNextPage(f){return!!f.meta.next_token}getItemArray(){return this.tweets}dateStringToSnowflakeId(f){let R=BigInt("1288834974657"),h=new Date(f);if(isNaN(h.valueOf()))throw Error("Unable to convert start_time/end_time to a valid date. A ISO 8601 DateTime is excepted, please check your input.");return(BigInt(h.valueOf())-R<<BigInt("22")).toString()}get tweets(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}}class z0 extends _f{refreshInstanceFromResult(f,R){super.refreshInstanceFromResult(f,R);let h=f.data;if(R)this._realData.meta.oldest_id=h.meta.oldest_id;else this._realData.meta.newest_id=h.meta.newest_id}getItemArray(){return this.tweets}get tweets(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}}class HA extends UA{constructor(){super(...arguments);this._endpoint="tweets/search/recent"}}class YA extends UA{constructor(){super(...arguments);this._endpoint="tweets/search/all"}}class ZA extends z0{constructor(){super(...arguments);this._endpoint="tweets/:id/quote_tweets"}}class JA extends z0{constructor(){super(...arguments);this._endpoint="users/:id/timelines/reverse_chronological"}}class MA extends z0{constructor(){super(...arguments);this._endpoint="users/:id/tweets"}}class XA extends z0{constructor(){super(...arguments);this._endpoint="users/:id/mentions"}}class SA extends z0{constructor(){super(...arguments);this._endpoint="users/:id/bookmarks"}}class DA extends _f{get tweets(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}getItemArray(){return this.tweets}}class zA extends DA{constructor(){super(...arguments);this._endpoint="users/:id/liked_tweets"}}class QA extends DA{constructor(){super(...arguments);this._endpoint="lists/:id/tweets"}}class of extends _f{getItemArray(){return this.users}get users(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}}class LA extends of{constructor(){super(...arguments);this._endpoint="users/:id/blocking"}}class IA extends of{constructor(){super(...arguments);this._endpoint="users/:id/muting"}}class wA extends of{constructor(){super(...arguments);this._endpoint="users/:id/followers"}}class qA extends of{constructor(){super(...arguments);this._endpoint="users/:id/following"}}class PA extends of{constructor(){super(...arguments);this._endpoint="lists/:id/members"}}class BA extends of{constructor(){super(...arguments);this._endpoint="lists/:id/followers"}}class KA extends of{constructor(){super(...arguments);this._endpoint="tweets/:id/liking_users"}}class vA extends of{constructor(){super(...arguments);this._endpoint="tweets/:id/retweeted_by"}}class c$ extends _f{getItemArray(){return this.lists}get lists(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}}class jA extends c${constructor(){super(...arguments);this._endpoint="users/:id/owned_lists"}}class yA extends c${constructor(){super(...arguments);this._endpoint="users/:id/list_memberships"}}class OA extends c${constructor(){super(...arguments);this._endpoint="users/:id/followed_lists"}}class Q0 extends jf{constructor(){super(...arguments);this._prefix=H0}}class b$ extends _f{getItemArray(){return this.events}get events(){var f;return(f=this._realData.data)!==null&&f!==void 0?f:[]}get meta(){return super.meta}}class VA extends b${constructor(){super(...arguments);this._endpoint="dm_events"}}class EA extends b${constructor(){super(...arguments);this._endpoint="dm_conversations/with/:participant_id/dm_events"}}class TA extends b${constructor(){super(...arguments);this._endpoint="dm_conversations/:dm_conversation_id/dm_events"}}class L0 extends jf{constructor(){super(...arguments);this._prefix=YR}get labs(){if(this._labs)return this._labs;return this._labs=new Q0(this)}async search(f,R={}){let h=typeof f==="string"?{...R,query:f}:{...f},$=await this.get("tweets/search/recent",h,{fullResponse:!0});return new HA({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}async searchAll(f,R={}){let h={...R,query:f},$=await this.get("tweets/search/all",h,{fullResponse:!0});return new YA({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:h})}singleTweet(f,R={}){return this.get("tweets/:id",R,{params:{id:f}})}tweets(f,R={}){return this.get("tweets",{ids:f,...R})}tweetCountRecent(f,R={}){return this.get("tweets/counts/recent",{query:f,...R})}tweetCountAll(f,R={}){return this.get("tweets/counts/all",{query:f,...R})}async tweetRetweetedBy(f,R={}){let{asPaginator:h,...$}=R,G=await this.get("tweets/:id/retweeted_by",$,{fullResponse:!0,params:{id:f}});if(!h)return G.data;return new vA({realData:G.data,rateLimit:G.rateLimit,instance:this,queryParams:$,sharedParams:{id:f}})}async tweetLikedBy(f,R={}){let{asPaginator:h,...$}=R,G=await this.get("tweets/:id/liking_users",$,{fullResponse:!0,params:{id:f}});if(!h)return G.data;return new KA({realData:G.data,rateLimit:G.rateLimit,instance:this,queryParams:$,sharedParams:{id:f}})}async homeTimeline(f={}){let R=await this.getCurrentUserV2Object(),h=await this.get("users/:id/timelines/reverse_chronological",f,{fullResponse:!0,params:{id:R.data.id}});return new JA({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:f,sharedParams:{id:R.data.id}})}async userTimeline(f,R={}){let h=await this.get("users/:id/tweets",R,{fullResponse:!0,params:{id:f}});return new MA({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R,sharedParams:{id:f}})}async userMentionTimeline(f,R={}){let h=await this.get("users/:id/mentions",R,{fullResponse:!0,params:{id:f}});return new XA({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R,sharedParams:{id:f}})}async quotes(f,R={}){let h=await this.get("tweets/:id/quote_tweets",R,{fullResponse:!0,params:{id:f}});return new ZA({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:R,sharedParams:{id:f}})}async bookmarks(f={}){let R=await this.getCurrentUserV2Object(),h=await this.get("users/:id/bookmarks",f,{fullResponse:!0,params:{id:R.data.id}});return new SA({realData:h.data,rateLimit:h.rateLimit,instance:this,queryParams:f,sharedParams:{id:R.data.id}})}me(f={}){return this.get("users/me",f)}user(f,R={}){return this.get("users/:id",R,{params:{id:f}})}users(f,R={}){let h=Array.isArray(f)?f.join(","):f;return this.get("users",{...R,ids:h})}userByUsername(f,R={}){return this.get("users/by/username/:username",R,{params:{username:f}})}usersByUsernames(f,R={}){return f=Array.isArray(f)?f.join(","):f,this.get("users/by",{...R,usernames:f})}async followers(f,R={}){let{asPaginator:h,...$}=R,G={id:f};if(!h)return this.get("users/:id/followers",$,{params:G});let A=await this.get("users/:id/followers",$,{fullResponse:!0,params:G});return new wA({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:$,sharedParams:G})}async following(f,R={}){let{asPaginator:h,...$}=R,G={id:f};if(!h)return this.get("users/:id/following",$,{params:G});let A=await this.get("users/:id/following",$,{fullResponse:!0,params:G});return new qA({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:$,sharedParams:G})}async userLikedTweets(f,R={}){let h={id:f},$=await this.get("users/:id/liked_tweets",R,{fullResponse:!0,params:h});return new zA({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async userBlockingUsers(f,R={}){let h={id:f},$=await this.get("users/:id/blocking",R,{fullResponse:!0,params:h});return new LA({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async userMutingUsers(f,R={}){let h={id:f},$=await this.get("users/:id/muting",R,{fullResponse:!0,params:h});return new IA({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}list(f,R={}){return this.get("lists/:id",R,{params:{id:f}})}async listsOwned(f,R={}){let h={id:f},$=await this.get("users/:id/owned_lists",R,{fullResponse:!0,params:h});return new jA({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listMemberships(f,R={}){let h={id:f},$=await this.get("users/:id/list_memberships",R,{fullResponse:!0,params:h});return new yA({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listFollowed(f,R={}){let h={id:f},$=await this.get("users/:id/followed_lists",R,{fullResponse:!0,params:h});return new OA({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listTweets(f,R={}){let h={id:f},$=await this.get("lists/:id/tweets",R,{fullResponse:!0,params:h});return new QA({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listMembers(f,R={}){let h={id:f},$=await this.get("lists/:id/members",R,{fullResponse:!0,params:h});return new PA({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listFollowers(f,R={}){let h={id:f},$=await this.get("lists/:id/followers",R,{fullResponse:!0,params:h});return new BA({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listDmEvents(f={}){let R=await this.get("dm_events",f,{fullResponse:!0});return new VA({realData:R.data,rateLimit:R.rateLimit,instance:this,queryParams:{...f}})}async listDmEventsWithParticipant(f,R={}){let h={participant_id:f},$=await this.get("dm_conversations/with/:participant_id/dm_events",R,{fullResponse:!0,params:h});return new EA({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}async listDmEventsOfConversation(f,R={}){let h={dm_conversation_id:f},$=await this.get("dm_conversations/:dm_conversation_id/dm_events",R,{fullResponse:!0,params:h});return new TA({realData:$.data,rateLimit:$.rateLimit,instance:this,queryParams:{...R},sharedParams:h})}space(f,R={}){return this.get("spaces/:id",R,{params:{id:f}})}spaces(f,R={}){return this.get("spaces",{ids:f,...R})}spacesByCreators(f,R={}){return this.get("spaces/by/creator_ids",{user_ids:f,...R})}searchSpaces(f){return this.get("spaces/search",f)}spaceBuyers(f,R={}){return this.get("spaces/:id/buyers",R,{params:{id:f}})}spaceTweets(f,R={}){return this.get("spaces/:id/tweets",R,{params:{id:f}})}searchStream({autoConnect:f,...R}={}){return this.getStream("tweets/search/stream",R,{payloadIsError:j$,autoConnect:f})}streamRules(f={}){return this.get("tweets/search/stream/rules",f)}updateStreamRules(f,R={}){return this.post("tweets/search/stream/rules",f,{query:R})}sampleStream({autoConnect:f,...R}={}){return this.getStream("tweets/sample/stream",R,{payloadIsError:j$,autoConnect:f})}sample10Stream({autoConnect:f,...R}={}){return this.getStream("tweets/sample10/stream",R,{payloadIsError:j$,autoConnect:f})}complianceJobs(f){return this.get("compliance/jobs",f)}complianceJob(f){return this.get("compliance/jobs/:id",void 0,{params:{id:f}})}async sendComplianceJob(f){let R=await this.post("compliance/jobs",{type:f.type,name:f.name}),h=f.ids instanceof Buffer?f.ids:Buffer.from(f.ids.join(`
78
78
  `));return await this.put(R.data.upload_url,h,{forceBodyMode:"raw",enableAuth:!1,headers:{"Content-Type":"text/plain"},prefix:""}),R}async complianceJobResult(f){let R=f;while(R.status!=="complete"){if(R.status==="expired"||R.status==="failed")throw Error("Job failed to be completed.");await new Promise(($)=>setTimeout($,3500)),R=(await this.complianceJob(f.id)).data}return(await this.get(f.download_url,void 0,{enableAuth:!1,prefix:""})).trim().split(`
79
- `).filter(($)=>$).map(($)=>JSON.parse($))}async usage(f={}){return this.get("usage/tweets",f)}community(f,R={}){return this.get("communities/:id",R,{params:{id:f}})}searchCommunities(f,R={}){return this.get("communities/search",{query:f,...R})}}class I0 extends Q0{constructor(){super(...arguments);this._prefix=H0}get readOnly(){return this}}class w0 extends L0{constructor(){super(...arguments);this._prefix=YR}get readOnly(){return this}get labs(){if(this._labs)return this._labs;return this._labs=new I0(this)}hideReply(f,R){return this.put("tweets/:id/hidden",{hidden:R},{params:{id:f}})}like(f,R){return this.post("users/:id/likes",{tweet_id:R},{params:{id:f}})}unlike(f,R){return this.delete("users/:id/likes/:tweet_id",void 0,{params:{id:f,tweet_id:R}})}retweet(f,R){return this.post("users/:id/retweets",{tweet_id:R},{params:{id:f}})}unretweet(f,R){return this.delete("users/:id/retweets/:tweet_id",void 0,{params:{id:f,tweet_id:R}})}tweet(f,R={}){if(typeof f==="object")R=f;else R={text:f,...R};return this.post("tweets",R)}async uploadMedia(f,R,h=1048576){let $=R.media_category;if(!R.media_category){if(R.media_type.includes("gif"))$="tweet_gif";else if(R.media_type.includes("image"))$="tweet_image";else if(R.media_type.includes("video"))$="tweet_video"}let G={command:"INIT",media_type:R.media_type,total_bytes:f.length,media_category:$},W=(await this.post("media/upload",G,{forceBodyMode:"form-data"})).data.id,F=Math.ceil(f.length/h),N=new Uint8Array(f);for(let X=0;X<F;X++){let z=X*h,S=Math.min(z+h,f.length),B=N.slice(z,S),C=Buffer.from(B),i={command:"APPEND",media_id:W,segment_index:X,media:C};await this.post("media/upload",i,{forceBodyMode:"form-data"})}let U={command:"FINALIZE",media_id:W};if((await this.post("media/upload",U,{forceBodyMode:"form-data"})).data.processing_info)await this.waitForMediaProcessing(W);return W}async waitForMediaProcessing(f){var R;let $=(await this.get("media/upload",{command:"STATUS",media_id:f})).data.processing_info;if(!$)return;switch($.state){case"succeeded":return;case"failed":throw Error(`Media processing failed: ${(R=$.error)===null||R===void 0?void 0:R.message}`);case"pending":case"in_progress":{let G=$===null||$===void 0?void 0:$.check_after_secs;if(G&&G>0)await new Promise((A)=>setTimeout(A,G*1000)),await this.waitForMediaProcessing(f)}}}createMediaMetadata(f,R){return this.post("media/metadata",{id:f,metadata:R})}reply(f,R,h={}){var $;let G={in_reply_to_tweet_id:R,...($=h.reply)!==null&&$!==void 0?$:{}};return this.post("tweets",{text:f,...h,reply:G})}quote(f,R,h={}){return this.tweet(f,{...h,quote_tweet_id:R})}async tweetThread(f){var R,h;let $=[];for(let G of f){let A=$.length?$[$.length-1]:null,W={...typeof G==="string"?{text:G}:G},F=A?A.data.id:(R=W.reply)===null||R===void 0?void 0:R.in_reply_to_tweet_id,N=(h=W.text)!==null&&h!==void 0?h:"";if(F)$.push(await this.reply(N,F,W));else $.push(await this.tweet(N,W))}return $}deleteTweet(f){return this.delete("tweets/:id",void 0,{params:{id:f}})}async bookmark(f){let R=await this.getCurrentUserV2Object();return this.post("users/:id/bookmarks",{tweet_id:f},{params:{id:R.data.id}})}async deleteBookmark(f){let R=await this.getCurrentUserV2Object();return this.delete("users/:id/bookmarks/:tweet_id",void 0,{params:{id:R.data.id,tweet_id:f}})}follow(f,R){return this.post("users/:id/following",{target_user_id:R},{params:{id:f}})}unfollow(f,R){return this.delete("users/:source_user_id/following/:target_user_id",void 0,{params:{source_user_id:f,target_user_id:R}})}block(f,R){return this.post("users/:id/blocking",{target_user_id:R},{params:{id:f}})}unblock(f,R){return this.delete("users/:source_user_id/blocking/:target_user_id",void 0,{params:{source_user_id:f,target_user_id:R}})}mute(f,R){return this.post("users/:id/muting",{target_user_id:R},{params:{id:f}})}unmute(f,R){return this.delete("users/:source_user_id/muting/:target_user_id",void 0,{params:{source_user_id:f,target_user_id:R}})}createList(f){return this.post("lists",f)}updateList(f,R={}){return this.put("lists/:id",R,{params:{id:f}})}removeList(f){return this.delete("lists/:id",void 0,{params:{id:f}})}addListMember(f,R){return this.post("lists/:id/members",{user_id:R},{params:{id:f}})}removeListMember(f,R){return this.delete("lists/:id/members/:user_id",void 0,{params:{id:f,user_id:R}})}subscribeToList(f,R){return this.post("users/:id/followed_lists",{list_id:R},{params:{id:f}})}unsubscribeOfList(f,R){return this.delete("users/:id/followed_lists/:list_id",void 0,{params:{id:f,list_id:R}})}pinList(f,R){return this.post("users/:id/pinned_lists",{list_id:R},{params:{id:f}})}unpinList(f,R){return this.delete("users/:id/pinned_lists/:list_id",void 0,{params:{id:f,list_id:R}})}sendDmInConversation(f,R){return this.post("dm_conversations/:dm_conversation_id/messages",R,{params:{dm_conversation_id:f}})}sendDmToParticipant(f,R){return this.post("dm_conversations/with/:participant_id/messages",R,{params:{participant_id:f}})}createDmConversation(f){return this.post("dm_conversations",f)}}class S7 extends I0{constructor(){super(...arguments);this._prefix=H0}get readWrite(){return this}}var D7=S7;class z7 extends w0{constructor(){super(...arguments);this._prefix=YR}get readWrite(){return this}get labs(){if(this._labs)return this._labs;return this._labs=new D7(this)}}var Q7=z7;class w1 extends MR{get v1(){if(this._v1)return this._v1;return this._v1=new S0(this)}get v2(){if(this._v2)return this._v2;return this._v2=new L0(this)}async currentUser(f=!1){return await this.getCurrentUserObject(f)}async currentUserV2(f=!1){return await this.getCurrentUserV2Object(f)}search(f,R){return this.v2.search(f,R)}async generateAuthLink(f="oob",{authAccessType:R,linkMode:h="authenticate",forceLogin:$,screenName:G}={}){let A=await this.post("https://api.x.com/oauth/request_token",{oauth_callback:f,x_auth_access_type:R}),W=`https://api.x.com/oauth/${h}?oauth_token=${encodeURIComponent(A.oauth_token)}`;if($!==void 0)W+=`&force_login=${encodeURIComponent($)}`;if(G!==void 0)W+=`&screen_name=${encodeURIComponent(G)}`;if(this._requestMaker.hasPlugins())this._requestMaker.applyPluginMethod("onOAuth1RequestToken",{client:this._requestMaker,url:W,oauthResult:A});return{url:W,...A}}async login(f){let R=this.getActiveTokens();if(R.type!=="oauth-1.0a")throw Error("You must setup TwitterApi instance with consumer keys to accept OAuth 1.0 login");let h=await this.post("https://api.x.com/oauth/access_token",{oauth_token:R.accessToken,oauth_verifier:f}),$=new q0({appKey:R.appKey,appSecret:R.appSecret,accessToken:h.oauth_token,accessSecret:h.oauth_token_secret},this._requestMaker.clientSettings);return{accessToken:h.oauth_token,accessSecret:h.oauth_token_secret,userId:h.user_id,screenName:h.screen_name,client:$}}async appLogin(){let f=this.getActiveTokens();if(f.type!=="oauth-1.0a")throw Error("You must setup TwitterApi instance with consumer keys to accept app-only login");let h=await new q0({username:f.appKey,password:f.appSecret},this._requestMaker.clientSettings).post("https://api.x.com/oauth2/token",{grant_type:"client_credentials"});return new q0(h.access_token,this._requestMaker.clientSettings)}generateOAuth2AuthLink(f,R={}){var h,$;if(!this._requestMaker.clientId)throw Error("Twitter API instance is not initialized with client ID. You can find your client ID in Twitter Developer Portal. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");let G=(h=R.state)!==null&&h!==void 0?h:gR.generateRandomString(32),A=gR.getCodeVerifier(),W=gR.getCodeChallengeFromVerifier(A),F=($=R.scope)!==null&&$!==void 0?$:"",N=Array.isArray(F)?F.join(" "):F,U=new URL("https://x.com/i/oauth2/authorize"),J={response_type:"code",client_id:this._requestMaker.clientId,redirect_uri:f,state:G,code_challenge:W,code_challenge_method:"s256",scope:N};vf.addQueryParamsToUrl(U,J);let X={url:U.toString(),state:G,codeVerifier:A,codeChallenge:W};if(this._requestMaker.hasPlugins())this._requestMaker.applyPluginMethod("onOAuth2RequestToken",{client:this._requestMaker,result:X,redirectUri:f});return X}async loginWithOAuth2({code:f,codeVerifier:R,redirectUri:h}){if(!this._requestMaker.clientId)throw Error("Twitter API instance is not initialized with client ID. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");let $=await this.post("https://api.x.com/2/oauth2/token",{code:f,code_verifier:R,redirect_uri:h,grant_type:"authorization_code",client_id:this._requestMaker.clientId,client_secret:this._requestMaker.clientSecret});return this.parseOAuth2AccessTokenResult($)}async refreshOAuth2Token(f){if(!this._requestMaker.clientId)throw Error("Twitter API instance is not initialized with client ID. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");let R=await this.post("https://api.x.com/2/oauth2/token",{refresh_token:f,grant_type:"refresh_token",client_id:this._requestMaker.clientId,client_secret:this._requestMaker.clientSecret});return this.parseOAuth2AccessTokenResult(R)}async revokeOAuth2Token(f,R="access_token"){if(!this._requestMaker.clientId)throw Error("Twitter API instance is not initialized with client ID. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");return await this.post("https://api.x.com/2/oauth2/revoke",{client_id:this._requestMaker.clientId,client_secret:this._requestMaker.clientSecret,token:f,token_type_hint:R})}parseOAuth2AccessTokenResult(f){let R=new q0(f.access_token,this._requestMaker.clientSettings),h=f.scope.split(" ").filter(($)=>$);return{client:R,expiresIn:f.expires_in,accessToken:f.access_token,scope:h,refreshToken:f.refresh_token}}}class q1 extends w1{get v1(){if(this._v1)return this._v1;return this._v1=new D0(this)}get v2(){if(this._v2)return this._v2;return this._v2=new w0(this)}get readOnly(){return this}}class x$ extends jf{constructor(){super(...arguments);this._prefix=Y0}}class k$ extends x${constructor(){super(...arguments);this._prefix=Y0}get readOnly(){return this}}class l$ extends jf{constructor(){super(...arguments);this._prefix=Z0}}class s$ extends l${constructor(){super(...arguments);this._prefix=Z0}get readOnly(){return this}}class L7 extends s${constructor(){super(...arguments);this._prefix=Z0}get readWrite(){return this}}var I7=L7;class w7 extends k${constructor(){super(...arguments);this._prefix=Y0}get readWrite(){return this}get sandbox(){if(this._sandbox)return this._sandbox;return this._sandbox=new I7(this)}}var q7=w7;class _$ extends q1{get v1(){if(this._v1)return this._v1;return this._v1=new C$(this)}get v2(){if(this._v2)return this._v2;return this._v2=new Q7(this)}get readWrite(){return this}get ads(){if(this._ads)return this._ads;return this._ads=new q7(this)}static getErrors(f){var R;if(typeof f!=="object")return[];if(!("data"in f))return[];return(R=f.data.errors)!==null&&R!==void 0?R:[]}static getProfileImageInSize(f,R){let h=f.split("/").pop(),$=["normal","bigger","mini"],G=f;for(let W of $)if(h.includes(`_${W}`)){G=f.replace(`_${W}`,"");break}if(R==="original")return G;let A=G.lastIndexOf(".");if(A!==-1){let W=G.slice(A+1);return G.slice(0,A)+"_"+R+"."+W}else return G+"_"+R}}var q0=_$;var wD={clientId:process.env.X_CLIENT_ID,clientSecret:process.env.X_SECRET,redirectPath:"/auth/oauth/x/callback",scope:["tweet.read","users.read","offline.access"]};class P7 extends U0{config;client;oauthStates=new Map;constructor(f={}){super();this.config={...wD,...f},this.client=new _$({clientId:this.config.clientId,clientSecret:this.config.clientSecret})}getRedirectUrl(){let{url:f,codeVerifier:R,state:h}=this.client.generateOAuth2AuthLink(`${process.env.HOST_NAME}${this.config.redirectPath}`,{scope:this.config.scope});return this.oauthStates.set(h,{state:h,codeVerifier:R}),B$.to(f),f}async onCallback(f){let R=f.search.get("code"),h=f.search.get("state"),$=this.oauthStates.get(h);if(!$)throw Error("Invalid or expired OAuth state");let G=await this.client.loginWithOAuth2({code:R,codeVerifier:$.codeVerifier,redirectUri:`${process.env.HOST_NAME}${this.config.redirectPath}`});this.oauthStates.delete(h);let{data:A}=await G.client.v2.me({"user.fields":["name","username","entities"]}),{name:W,email:F,id:N="",username:U}=A??{};return{name:W,email:F,username:U,providerId:N}}}class B7 extends r{kernel;jobs=[];constructor(f){super();this.kernel=f}boot(){}}class K7{name;cron;callback(){}onTick(){}onComplete(){}static exp(f){return f}}export{P7 as XOAuthProvider,_H as ViewRouterServiceProvider,P$ as Sharp,UN as S3Driver,w$ as ResendDriver,HN as RateLimiterServiceProvider,lh as RateLimiterDriver,iH as QueueServiceProvider,U0 as OAuthProvider,aH as LoggingServiceProvider,pH as Job,sh as InMemoryRateLimiter,oH as ImageOptimizationServiceProvider,q$ as ImageOptimizationDriver,nH as GoogleOAuthProvider,B1 as FileSystemDriver,CA as FileStorageServiceProvider,CR as FileStorageDriver,lH as EmailServiceProvider,I$ as EmailDriver,B7 as CronServiceProvider,K7 as CronJob,sH as BroadcastingServiceProvider,dH as ApiRouterServiceProvider};export{CA as G,dH as H,HN as I,lH as J,sH as K,_H as L,aH as M,iH as N,oH as O,B7 as P};
79
+ `).filter(($)=>$).map(($)=>JSON.parse($))}async usage(f={}){return this.get("usage/tweets",f)}community(f,R={}){return this.get("communities/:id",R,{params:{id:f}})}searchCommunities(f,R={}){return this.get("communities/search",{query:f,...R})}}class I0 extends Q0{constructor(){super(...arguments);this._prefix=H0}get readOnly(){return this}}class w0 extends L0{constructor(){super(...arguments);this._prefix=YR}get readOnly(){return this}get labs(){if(this._labs)return this._labs;return this._labs=new I0(this)}hideReply(f,R){return this.put("tweets/:id/hidden",{hidden:R},{params:{id:f}})}like(f,R){return this.post("users/:id/likes",{tweet_id:R},{params:{id:f}})}unlike(f,R){return this.delete("users/:id/likes/:tweet_id",void 0,{params:{id:f,tweet_id:R}})}retweet(f,R){return this.post("users/:id/retweets",{tweet_id:R},{params:{id:f}})}unretweet(f,R){return this.delete("users/:id/retweets/:tweet_id",void 0,{params:{id:f,tweet_id:R}})}tweet(f,R={}){if(typeof f==="object")R=f;else R={text:f,...R};return this.post("tweets",R)}async uploadMedia(f,R,h=1048576){let $=R.media_category;if(!R.media_category){if(R.media_type.includes("gif"))$="tweet_gif";else if(R.media_type.includes("image"))$="tweet_image";else if(R.media_type.includes("video"))$="tweet_video"}let G={command:"INIT",media_type:R.media_type,total_bytes:f.length,media_category:$},W=(await this.post("media/upload",G,{forceBodyMode:"form-data"})).data.id,F=Math.ceil(f.length/h),N=new Uint8Array(f);for(let X=0;X<F;X++){let z=X*h,S=Math.min(z+h,f.length),B=N.slice(z,S),C=Buffer.from(B),i={command:"APPEND",media_id:W,segment_index:X,media:C};await this.post("media/upload",i,{forceBodyMode:"form-data"})}let U={command:"FINALIZE",media_id:W};if((await this.post("media/upload",U,{forceBodyMode:"form-data"})).data.processing_info)await this.waitForMediaProcessing(W);return W}async waitForMediaProcessing(f){var R;let $=(await this.get("media/upload",{command:"STATUS",media_id:f})).data.processing_info;if(!$)return;switch($.state){case"succeeded":return;case"failed":throw Error(`Media processing failed: ${(R=$.error)===null||R===void 0?void 0:R.message}`);case"pending":case"in_progress":{let G=$===null||$===void 0?void 0:$.check_after_secs;if(G&&G>0)await new Promise((A)=>setTimeout(A,G*1000)),await this.waitForMediaProcessing(f)}}}createMediaMetadata(f,R){return this.post("media/metadata",{id:f,metadata:R})}reply(f,R,h={}){var $;let G={in_reply_to_tweet_id:R,...($=h.reply)!==null&&$!==void 0?$:{}};return this.post("tweets",{text:f,...h,reply:G})}quote(f,R,h={}){return this.tweet(f,{...h,quote_tweet_id:R})}async tweetThread(f){var R,h;let $=[];for(let G of f){let A=$.length?$[$.length-1]:null,W={...typeof G==="string"?{text:G}:G},F=A?A.data.id:(R=W.reply)===null||R===void 0?void 0:R.in_reply_to_tweet_id,N=(h=W.text)!==null&&h!==void 0?h:"";if(F)$.push(await this.reply(N,F,W));else $.push(await this.tweet(N,W))}return $}deleteTweet(f){return this.delete("tweets/:id",void 0,{params:{id:f}})}async bookmark(f){let R=await this.getCurrentUserV2Object();return this.post("users/:id/bookmarks",{tweet_id:f},{params:{id:R.data.id}})}async deleteBookmark(f){let R=await this.getCurrentUserV2Object();return this.delete("users/:id/bookmarks/:tweet_id",void 0,{params:{id:R.data.id,tweet_id:f}})}follow(f,R){return this.post("users/:id/following",{target_user_id:R},{params:{id:f}})}unfollow(f,R){return this.delete("users/:source_user_id/following/:target_user_id",void 0,{params:{source_user_id:f,target_user_id:R}})}block(f,R){return this.post("users/:id/blocking",{target_user_id:R},{params:{id:f}})}unblock(f,R){return this.delete("users/:source_user_id/blocking/:target_user_id",void 0,{params:{source_user_id:f,target_user_id:R}})}mute(f,R){return this.post("users/:id/muting",{target_user_id:R},{params:{id:f}})}unmute(f,R){return this.delete("users/:source_user_id/muting/:target_user_id",void 0,{params:{source_user_id:f,target_user_id:R}})}createList(f){return this.post("lists",f)}updateList(f,R={}){return this.put("lists/:id",R,{params:{id:f}})}removeList(f){return this.delete("lists/:id",void 0,{params:{id:f}})}addListMember(f,R){return this.post("lists/:id/members",{user_id:R},{params:{id:f}})}removeListMember(f,R){return this.delete("lists/:id/members/:user_id",void 0,{params:{id:f,user_id:R}})}subscribeToList(f,R){return this.post("users/:id/followed_lists",{list_id:R},{params:{id:f}})}unsubscribeOfList(f,R){return this.delete("users/:id/followed_lists/:list_id",void 0,{params:{id:f,list_id:R}})}pinList(f,R){return this.post("users/:id/pinned_lists",{list_id:R},{params:{id:f}})}unpinList(f,R){return this.delete("users/:id/pinned_lists/:list_id",void 0,{params:{id:f,list_id:R}})}sendDmInConversation(f,R){return this.post("dm_conversations/:dm_conversation_id/messages",R,{params:{dm_conversation_id:f}})}sendDmToParticipant(f,R){return this.post("dm_conversations/with/:participant_id/messages",R,{params:{participant_id:f}})}createDmConversation(f){return this.post("dm_conversations",f)}}class S7 extends I0{constructor(){super(...arguments);this._prefix=H0}get readWrite(){return this}}var D7=S7;class z7 extends w0{constructor(){super(...arguments);this._prefix=YR}get readWrite(){return this}get labs(){if(this._labs)return this._labs;return this._labs=new D7(this)}}var Q7=z7;class w1 extends MR{get v1(){if(this._v1)return this._v1;return this._v1=new S0(this)}get v2(){if(this._v2)return this._v2;return this._v2=new L0(this)}async currentUser(f=!1){return await this.getCurrentUserObject(f)}async currentUserV2(f=!1){return await this.getCurrentUserV2Object(f)}search(f,R){return this.v2.search(f,R)}async generateAuthLink(f="oob",{authAccessType:R,linkMode:h="authenticate",forceLogin:$,screenName:G}={}){let A=await this.post("https://api.x.com/oauth/request_token",{oauth_callback:f,x_auth_access_type:R}),W=`https://api.x.com/oauth/${h}?oauth_token=${encodeURIComponent(A.oauth_token)}`;if($!==void 0)W+=`&force_login=${encodeURIComponent($)}`;if(G!==void 0)W+=`&screen_name=${encodeURIComponent(G)}`;if(this._requestMaker.hasPlugins())this._requestMaker.applyPluginMethod("onOAuth1RequestToken",{client:this._requestMaker,url:W,oauthResult:A});return{url:W,...A}}async login(f){let R=this.getActiveTokens();if(R.type!=="oauth-1.0a")throw Error("You must setup TwitterApi instance with consumer keys to accept OAuth 1.0 login");let h=await this.post("https://api.x.com/oauth/access_token",{oauth_token:R.accessToken,oauth_verifier:f}),$=new q0({appKey:R.appKey,appSecret:R.appSecret,accessToken:h.oauth_token,accessSecret:h.oauth_token_secret},this._requestMaker.clientSettings);return{accessToken:h.oauth_token,accessSecret:h.oauth_token_secret,userId:h.user_id,screenName:h.screen_name,client:$}}async appLogin(){let f=this.getActiveTokens();if(f.type!=="oauth-1.0a")throw Error("You must setup TwitterApi instance with consumer keys to accept app-only login");let h=await new q0({username:f.appKey,password:f.appSecret},this._requestMaker.clientSettings).post("https://api.x.com/oauth2/token",{grant_type:"client_credentials"});return new q0(h.access_token,this._requestMaker.clientSettings)}generateOAuth2AuthLink(f,R={}){var h,$;if(!this._requestMaker.clientId)throw Error("Twitter API instance is not initialized with client ID. You can find your client ID in Twitter Developer Portal. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");let G=(h=R.state)!==null&&h!==void 0?h:gR.generateRandomString(32),A=gR.getCodeVerifier(),W=gR.getCodeChallengeFromVerifier(A),F=($=R.scope)!==null&&$!==void 0?$:"",N=Array.isArray(F)?F.join(" "):F,U=new URL("https://x.com/i/oauth2/authorize"),J={response_type:"code",client_id:this._requestMaker.clientId,redirect_uri:f,state:G,code_challenge:W,code_challenge_method:"s256",scope:N};vf.addQueryParamsToUrl(U,J);let X={url:U.toString(),state:G,codeVerifier:A,codeChallenge:W};if(this._requestMaker.hasPlugins())this._requestMaker.applyPluginMethod("onOAuth2RequestToken",{client:this._requestMaker,result:X,redirectUri:f});return X}async loginWithOAuth2({code:f,codeVerifier:R,redirectUri:h}){if(!this._requestMaker.clientId)throw Error("Twitter API instance is not initialized with client ID. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");let $=await this.post("https://api.x.com/2/oauth2/token",{code:f,code_verifier:R,redirect_uri:h,grant_type:"authorization_code",client_id:this._requestMaker.clientId,client_secret:this._requestMaker.clientSecret});return this.parseOAuth2AccessTokenResult($)}async refreshOAuth2Token(f){if(!this._requestMaker.clientId)throw Error("Twitter API instance is not initialized with client ID. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");let R=await this.post("https://api.x.com/2/oauth2/token",{refresh_token:f,grant_type:"refresh_token",client_id:this._requestMaker.clientId,client_secret:this._requestMaker.clientSecret});return this.parseOAuth2AccessTokenResult(R)}async revokeOAuth2Token(f,R="access_token"){if(!this._requestMaker.clientId)throw Error("Twitter API instance is not initialized with client ID. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");return await this.post("https://api.x.com/2/oauth2/revoke",{client_id:this._requestMaker.clientId,client_secret:this._requestMaker.clientSecret,token:f,token_type_hint:R})}parseOAuth2AccessTokenResult(f){let R=new q0(f.access_token,this._requestMaker.clientSettings),h=f.scope.split(" ").filter(($)=>$);return{client:R,expiresIn:f.expires_in,accessToken:f.access_token,scope:h,refreshToken:f.refresh_token}}}class q1 extends w1{get v1(){if(this._v1)return this._v1;return this._v1=new D0(this)}get v2(){if(this._v2)return this._v2;return this._v2=new w0(this)}get readOnly(){return this}}class x$ extends jf{constructor(){super(...arguments);this._prefix=Y0}}class k$ extends x${constructor(){super(...arguments);this._prefix=Y0}get readOnly(){return this}}class l$ extends jf{constructor(){super(...arguments);this._prefix=Z0}}class s$ extends l${constructor(){super(...arguments);this._prefix=Z0}get readOnly(){return this}}class L7 extends s${constructor(){super(...arguments);this._prefix=Z0}get readWrite(){return this}}var I7=L7;class w7 extends k${constructor(){super(...arguments);this._prefix=Y0}get readWrite(){return this}get sandbox(){if(this._sandbox)return this._sandbox;return this._sandbox=new I7(this)}}var q7=w7;class _$ extends q1{get v1(){if(this._v1)return this._v1;return this._v1=new C$(this)}get v2(){if(this._v2)return this._v2;return this._v2=new Q7(this)}get readWrite(){return this}get ads(){if(this._ads)return this._ads;return this._ads=new q7(this)}static getErrors(f){var R;if(typeof f!=="object")return[];if(!("data"in f))return[];return(R=f.data.errors)!==null&&R!==void 0?R:[]}static getProfileImageInSize(f,R){let h=f.split("/").pop(),$=["normal","bigger","mini"],G=f;for(let W of $)if(h.includes(`_${W}`)){G=f.replace(`_${W}`,"");break}if(R==="original")return G;let A=G.lastIndexOf(".");if(A!==-1){let W=G.slice(A+1);return G.slice(0,A)+"_"+R+"."+W}else return G+"_"+R}}var q0=_$;var wD={clientId:process.env.X_CLIENT_ID,clientSecret:process.env.X_SECRET,redirectPath:"/auth/oauth/x/callback",scope:["tweet.read","users.read","offline.access"]};class P7 extends U0{config;client;oauthStates=new Map;constructor(f={}){super();this.config={...wD,...f},this.client=new _$({clientId:this.config.clientId,clientSecret:this.config.clientSecret})}getRedirectUrl(){let{url:f,codeVerifier:R,state:h}=this.client.generateOAuth2AuthLink(`${process.env.HOST_NAME}${this.config.redirectPath}`,{scope:this.config.scope});return this.oauthStates.set(h,{state:h,codeVerifier:R}),B$.to(f),f}async onCallback(f){let R=f.search.get("code"),h=f.search.get("state"),$=this.oauthStates.get(h);if(!$)throw Error("Invalid or expired OAuth state");let G=await this.client.loginWithOAuth2({code:R,codeVerifier:$.codeVerifier,redirectUri:`${process.env.HOST_NAME}${this.config.redirectPath}`});this.oauthStates.delete(h);let{data:A}=await G.client.v2.me({"user.fields":["name","username","entities"]}),{name:W,email:F,id:N="",username:U}=A??{};return{name:W,email:F,username:U,providerId:N}}}class B7 extends r{kernel;jobs=[];constructor(f){super();this.kernel=f}boot(){}}class K7{name;cron;callback(){}onTick(){}onComplete(){}static exp(f){return f}}export{P7 as XOAuthProvider,_H as ViewRouterServiceProvider,P$ as Sharp,UN as S3Driver,w$ as ResendDriver,HN as RateLimiterServiceProvider,lh as RateLimiterDriver,iH as QueueServiceProvider,U0 as OAuthProvider,aH as LoggingServiceProvider,pH as Job,sh as InMemoryRateLimiter,oH as ImageOptimizationServiceProvider,q$ as ImageOptimizationDriver,nH as GoogleOAuthProvider,B1 as FileSystemDriver,CA as FileStorageServiceProvider,CR as FileStorageDriver,lH as EmailServiceProvider,I$ as EmailDriver,B7 as CronServiceProvider,K7 as CronJob,sH as BroadcastingServiceProvider,dH as ApiRouterServiceProvider};export{CA as H,dH as I,HN as J,lH as K,sH as L,_H as M,aH as N,iH as O,oH as P,B7 as Q};
80
80
 
81
- //# debugId=F5FF0F6E5A93909E64756E2164756E21
81
+ //# debugId=7E22DC087C7FC44464756E2164756E21