6 lines
43 KiB
JavaScript
6 lines
43 KiB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8112],{4057:(t,e,r)=>{"use strict";var n=r(45063),i=r(57374);function a(t,e,r){if(!(this instanceof a))return new a(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=a,a.prototype._init=function(t){t.length>this.blockSize&&(t=new this.Hash().update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(e=0,this.inner=new this.Hash().update(t);e<t.length;e++)t[e]^=106;this.outer=new this.Hash().update(t)},a.prototype.update=function(t,e){return this.inner.update(t,e),this},a.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},6304:(t,e,r)=>{"use strict";r.d(e,{generateDOCX:()=>tk});var n=r(78419),i=r(26572);let a=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,o=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,s=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function l(t,e){var r;return"__proto__"===t||"constructor"===t&&e&&"object"==typeof e&&"prototype"in e?void(r=t,console.warn(`[destr] Dropping "${r}" key to prevent prototype pollution.`)):e}function c(t,e={}){if("string"!=typeof t)return t;if('"'===t[0]&&'"'===t[t.length-1]&&-1===t.indexOf("\\"))return t.slice(1,-1);let r=t.trim();if(r.length<=9)switch(r.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return NaN;case"infinity":return 1/0;case"-infinity":return-1/0}if(!s.test(t)){if(e.strict)throw SyntaxError("[destr] Invalid JSON");return t}try{if(a.test(t)||o.test(t)){if(e.strict)throw Error("[destr] Possible prototype pollution");return JSON.parse(t,l)}return JSON.parse(t)}catch(r){if(e.strict)throw r;return t}}let h=/#/g,u=/&/g,f=/\//g,p=/=/g,d=/\+/g,x=/%5e/gi,g=/%60/gi,b=/%7c/gi,m=/%20/gi;function y(t){return encodeURI(""+("string"==typeof t?t:JSON.stringify(t))).replace(b,"|").replace(d,"%2B").replace(m,"+").replace(h,"%23").replace(u,"%26").replace(g,"`").replace(x,"^").replace(f,"%2F")}function w(t){return y(t).replace(p,"%3D")}function v(t=""){try{return decodeURIComponent(""+t)}catch{return""+t}}let k=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,_=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,F=/^([/\\]\s*){2,}[^/\\]/,S=/\/$|\/\?|\/#/,A=/^\.?\//;function E(t,e={}){return("boolean"==typeof e&&(e={acceptRelative:e}),e.strict)?k.test(t):_.test(t)||!!e.acceptRelative&&F.test(t)}let T=Symbol.for("ufo:protocolRelative");function L(t=""){let[e="",r="",n=""]=(t.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:e,search:r,hash:n}}class j extends Error{constructor(t,e){super(t,e),this.name="FetchError",e?.cause&&!this.cause&&(this.cause=e.cause)}}let z=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function B(t="GET"){return z.has(t.toUpperCase())}let C=new Set(["image/svg","application/xml","application/xhtml","application/html"]),$=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;async function R(t,e){if(e)if(Array.isArray(e))for(let r of e)await r(t);else await e(t)}let H=new Set([408,409,425,429,500,502,503,504]),D=new Set([101,204,205,304]),N=function(){if("u">typeof globalThis)return globalThis;if("u">typeof self)return self;if("u">typeof window)return window;if("u">typeof global)return global;throw Error("unable to locate global object")}(),q=N.fetch?(...t)=>N.fetch(...t):()=>Promise.reject(Error("[ofetch] global.fetch is not supported!")),M=function t(e={}){let{fetch:r=globalThis.fetch,Headers:n=globalThis.Headers,AbortController:i=globalThis.AbortController}=e;async function a(t){let e=t.error&&"AbortError"===t.error.name&&!t.options.timeout||!1;if(!1!==t.options.retry&&!e){let e;e="number"==typeof t.options.retry?t.options.retry:+!B(t.options.method);let r=t.response&&t.response.status||500;if(e>0&&(Array.isArray(t.options.retryStatusCodes)?t.options.retryStatusCodes.includes(r):H.has(r))){let r="function"==typeof t.options.retryDelay?t.options.retryDelay(t):t.options.retryDelay||0;return r>0&&await new Promise(t=>setTimeout(t,r)),o(t.request,{...t.options,retry:e-1})}}let r=function(t){let e=t.error?.message||t.error?.toString()||"",r=t.request?.method||t.options?.method||"GET",n=t.request?.url||String(t.request)||"/",i=`[${r}] ${JSON.stringify(n)}`,a=t.response?`${t.response.status} ${t.response.statusText}`:"<no response>",o=new j(`${i}: ${a}${e?` ${e}`:""}`,t.error?{cause:t.error}:void 0);for(let e of["request","options","response"])Object.defineProperty(o,e,{get:()=>t[e]});for(let[e,r]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(o,e,{get:()=>t.response&&t.response[r]});return o}(t);throw Error.captureStackTrace&&Error.captureStackTrace(r,o),r}let o=async function(t,o={}){var s,l,h,u;let f,p,x,g={request:t,options:(s=e.defaults,x=function(t,e,r){if(!e)return new r(t);let n=new r(e);if(t)for(let[e,i]of Symbol.iterator in t||Array.isArray(t)?t:new r(t))n.set(e,i);return n}(o?.headers??t?.headers,s?.headers,n),(s?.query||s?.params||o?.params||o?.query)&&(p={...s?.params,...s?.query,...o?.params,...o?.query}),{...s,...o,query:p,params:p,headers:x}),response:void 0,error:void 0};if(g.options.method&&(g.options.method=g.options.method.toUpperCase()),g.options.onRequest&&(await R(g,g.options.onRequest),g.options.headers instanceof n||(g.options.headers=new n(g.options.headers||{}))),"string"==typeof g.request){if(g.options.baseURL&&(g.request=function(t,e){var r;if(!(r=e)||"/"===r||E(t))return t;let n=function(t=""){return(!function(t=""){return t.endsWith("/")}(t)?t:t.slice(0,-1))||"/"}(e);if(t.startsWith(n)){let e=t[n.length];if(!e||"/"===e||"?"===e)return t}return function(t,...e){let r=t||"";for(let t of e.filter(t=>t&&"/"!==t))if(r){let e=t.replace(A,"");r=function(t=""){return t.endsWith("/")?t:t+"/"}(r)+e}else r=t;return r}(n,t)}(g.request,g.options.baseURL)),g.options.query){let t,e,r,n,i,a,o;l=g.request,h=g.options.query,e={...function(t=""){let e=Object.create(null);for(let r of("?"===t[0]&&(t=t.slice(1)),t.split("&"))){let t=r.match(/([^=]+)=?(.*)/)||[];if(t.length<2)continue;let n=v(t[1].replace(d," "));if("__proto__"===n||"constructor"===n)continue;let i=v((t[2]||"").replace(d," "));void 0===e[n]?e[n]=i:Array.isArray(e[n])?e[n].push(i):e[n]=[e[n],i]}return e}((t=function t(e="",r){let n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){let[,t,e=""]=n;return{protocol:t.toLowerCase(),pathname:e,href:t+e,auth:"",host:"",search:"",hash:""}}if(!E(e,{acceptRelative:!0}))return r?t(r+e):L(e);let[,i="",a,o=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,s="",l=""]=o.match(/([^#/?]*)(.*)?/)||[];"file:"===i&&(l=l.replace(/\/(?=[A-Za-z]:)/,""));let{pathname:c,search:h,hash:u}=L(l);return{protocol:i.toLowerCase(),auth:a?a.slice(0,Math.max(0,a.length-1)):"",host:s,pathname:c,search:h,hash:u,[T]:!i}}(l)).search),...h},t.search=Object.keys(e).filter(t=>void 0!==e[t]).map(t=>{var r;return(("number"==typeof(r=e[t])||"boolean"==typeof r)&&(r=String(r)),r)?Array.isArray(r)?r.map(e=>`${w(t)}=${y(e)}`).join("&"):`${w(t)}=${y(r)}`:w(t)}).filter(Boolean).join("&"),r=(u=t).pathname||"",n=u.search?(u.search.startsWith("?")?"":"?")+u.search:"",i=u.hash||"",a=u.auth?u.auth+"@":"",o=u.host||"",g.request=(u.protocol||u[T]?(u.protocol||"")+"//":"")+a+o+r+n+i,delete g.options.query}"query"in g.options&&delete g.options.query,"params"in g.options&&delete g.options.params}if(g.options.body&&B(g.options.method))if(function(t){if(void 0===t)return!1;let e=typeof t;return"string"===e||"number"===e||"boolean"===e||null===e||"object"===e&&(!!Array.isArray(t)||!(t.buffer||t instanceof FormData||t instanceof URLSearchParams)&&(t.constructor&&"Object"===t.constructor.name||"function"==typeof t.toJSON))}(g.options.body)){let t=g.options.headers.get("content-type");"string"!=typeof g.options.body&&(g.options.body="application/x-www-form-urlencoded"===t?new URLSearchParams(g.options.body).toString():JSON.stringify(g.options.body)),t||g.options.headers.set("content-type","application/json"),g.options.headers.has("accept")||g.options.headers.set("accept","application/json")}else("pipeTo"in g.options.body&&"function"==typeof g.options.body.pipeTo||"function"==typeof g.options.body.pipe)&&!("duplex"in g.options)&&(g.options.duplex="half");if(!g.options.signal&&g.options.timeout){let t=new i;f=setTimeout(()=>{let e=Error("[TimeoutError]: The operation was aborted due to timeout");e.name="TimeoutError",e.code=23,t.abort(e)},g.options.timeout),g.options.signal=t.signal}try{g.response=await r(g.request,g.options)}catch(t){return g.error=t,g.options.onRequestError&&await R(g,g.options.onRequestError),await a(g)}finally{f&&clearTimeout(f)}if((g.response.body||g.response._bodyInit)&&!D.has(g.response.status)&&"HEAD"!==g.options.method){let t=(g.options.parseResponse?"json":g.options.responseType)||function(t=""){if(!t)return"json";let e=t.split(";").shift()||"";return $.test(e)?"json":"text/event-stream"===e?"stream":C.has(e)||e.startsWith("text/")?"text":"blob"}(g.response.headers.get("content-type")||"");switch(t){case"json":{let t=await g.response.text(),e=g.options.parseResponse||c;g.response._data=e(t);break}case"stream":g.response._data=g.response.body||g.response._bodyInit;break;default:g.response._data=await g.response[t]()}}return(g.options.onResponse&&await R(g,g.options.onResponse),!g.options.ignoreResponseError&&g.response.status>=400&&g.response.status<600)?(g.options.onResponseError&&await R(g,g.options.onResponseError),await a(g)):g.response},s=async function(t,e){return(await o(t,e))._data};return s.raw=o,s.native=(...t)=>r(...t),s.create=(r={},n={})=>t({...e,...n,defaults:{...e.defaults,...n.defaults,...r}}),s}({fetch:q,Headers:N.Headers,AbortController:N.AbortController}),I="Consolas",W={left:"left",right:"right",center:"center",justify:"both"};function P(t){return Math.round(96*t/1440)}function O(t){return Math.round(15*t)}let U=/^(-?[\d.]+)(px|pt|em|rem|%|)?$/,G={px:1,pt:1.333,em:16,rem:16,"%":.16};function J(t){if(!t)return 0;let e=(t=t.trim()).match(U);if(!e)return 0;let r=parseFloat(e[1]);return isNaN(r)?0:r*(G[e[2]||"px"]??1)}let X=/^([\d.]+)(in|mm|cm|pt|pc|pi)$/,Y={in:1,mm:1/25.4,cm:1/2.54,pt:1/72,pc:1/6,pi:1/6};function K(t){if("number"==typeof t)return t;let e=t.match(X);if(e){let t=parseFloat(e[1]),r=Y[e[2]];return void 0!==r?t*r:t}let r=parseFloat(t);return isNaN(r)?6.5:r}function Q(t){return"number"==typeof t?t:Math.round(96*K(t))}let Z={black:"#000000",white:"#FFFFFF",red:"#FF0000",green:"#008000",blue:"#0000FF",yellow:"#FFFF00",orange:"#FFA500",purple:"#800080",pink:"#FFC0CB",brown:"#A52A2A",gray:"#808080",grey:"#808080",cyan:"#00FFFF",magenta:"#FF00FF",lime:"#00FF00",navy:"#000080",teal:"#008080",maroon:"#800000",olive:"#808000",silver:"#C0C0C0",gold:"#FFD700",indigo:"#4B0082",violet:"#EE82EE",aqua:"#00FFFF",fuchsia:"#FF00FF",darkblue:"#00008B",darkcyan:"#008B8B",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkviolet:"#9400D3",lightblue:"#ADD8E6",lightcyan:"#E0FFFF",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightyellow:"#FFFFE0"};function V(t){if(t)return t.startsWith("#")?t:Z[t.toLowerCase()]||t}let tt=(t,e)=>t?"number"==typeof t?t:Math.round(1440*K(t)):e;function te(t){if(!t)return;let e={};return t.color&&(e.color=t.color.replace("#","")),void 0!==t.size&&(e.size=t.size),t.style&&(e.style=t.style),void 0!==t.space&&(e.space=t.space),Object.keys(e).length>0?e:void 0}let tr=553.92,tn={jpg:"jpg",jpeg:"jpg",png:"png",gif:"gif",bmp:"bmp",tif:"tif",tiff:"tif",ico:"ico",emf:"emf",wmf:"wmf",svg:"svg"},ti={"image/jpeg":"jpg","image/png":"png","image/gif":"gif","image/bmp":"bmp","image/tiff":"tif","image/x-icon":"ico","image/x-emf":"emf","image/x-wmf":"wmf","image/svg+xml":"svg"};function ta(t){if(t.startsWith("data:")){let e=t.match(/data:image\/([\w+-]+);/);if(e)return ti[e[1].toLowerCase()]||"png"}else{let e=t.split(".").pop()?.toLowerCase();if(e)return tn[e]||"png"}return"png"}let to=(t,e=tr)=>{if(!t.width||!t.height)return{width:e,height:Math.round(.75*e)};if(t.width<=e)return{width:t.width,height:t.height};let r=e/t.width;return{width:e,height:Math.round(t.height*r)}};async function ts(t){try{let e,r=await (await M(t,{responseType:"blob"})).bytes();try{e=(0,i.L)(r)}catch(r){console.warn("Failed to extract image metadata:",r),e={width:void 0,height:void 0,type:ta(t)||"png",orientation:void 0}}return{data:r,meta:e}}catch(e){throw console.warn(`Failed to fetch image from ${t}:`,e),e}}async function tl(t){if(t.startsWith("http")){let{data:e}=await ts(t);return e}if(t.startsWith("data:")){let e=t.split(",")[1];if(!e)throw Error("Invalid data URL: missing base64 data");let r=atob(e);return Uint8Array.from(r,t=>t.charCodeAt(0))}throw Error(`Unsupported image source format: ${t.substring(0,20)}...`)}let tc=(t,e)=>{if(!e)return t;let r={...t};return(e.indentLeft||e.indentRight||e.indentFirstLine||e.indentFirstLineChars)&&(r.indent={...e.indentLeft&&{left:O(J(e.indentLeft))},...e.indentRight&&{right:O(J(e.indentRight))},...e.indentFirstLine&&{firstLine:O(J(e.indentFirstLine))},...null!=e.indentFirstLineChars&&{firstLineChars:e.indentFirstLineChars}}),(e.spacingBefore||e.spacingAfter)&&(r.spacing={...e.spacingBefore&&{before:O(J(e.spacingBefore))},...e.spacingAfter&&{after:O(J(e.spacingAfter))}}),e.textAlign&&(r.alignment=W[e.textAlign]),e.shading&&(r.shading=function(t){if(!t||!t.fill)return;let e={};return t.fill&&(e.fill=t.fill.replace("#","")),t.color&&(e.color=t.color.replace("#","")),e.val=t.type||"clear",e}(e.shading)),(e.borderTop||e.borderBottom||e.borderLeft||e.borderRight)&&(r.border={...e.borderTop&&{top:te(e.borderTop)},...e.borderBottom&&{bottom:te(e.borderBottom)},...e.borderLeft&&{left:te(e.borderLeft)},...e.borderRight&&{right:te(e.borderRight)}}),r};function th(t){let e,r,i,a=t.marks?.some(t=>"bold"===t.type),o=t.marks?.some(t=>"italic"===t.type),s=t.marks?.some(t=>"underline"===t.type),l=t.marks?.some(t=>"strike"===t.type),c=t.marks?.find(t=>"strike"===t.type&&t.attrs?.doubleStrike),h=t.marks?.some(t=>"code"===t.type),u=t.marks?.some(t=>"subscript"===t.type),f=t.marks?.some(t=>"superscript"===t.type),p=t.marks?.find(t=>"link"===t.type),d=t.marks?.find(t=>"textStyle"===t.type),x=t.marks?.find(t=>"highlight"===t.type)?.attrs?.color,g=V(d?.attrs?.color),b=V(d?.attrs?.backgroundColor);if(d?.attrs?.fontSize){let t=d.attrs.fontSize;if(t.endsWith("px")){let r=parseFloat(t);isNaN(r)||(e=Math.round(1.5*r))}}if(h?r=I:d?.attrs?.fontFamily&&(r=d.attrs.fontFamily),d?.attrs?.letterSpacing){let t=d.attrs.letterSpacing;if(t.endsWith("px")){let e=parseFloat(t);isNaN(e)||(i=Math.round(15*e))}}let m={text:t.text||"",bold:a||void 0,italics:o||void 0,underline:s?{}:void 0,strike:l||void 0,doubleStrike:!!c||void 0,font:r,size:e,subScript:u||void 0,superScript:f||void 0,color:g,shading:b?{fill:b}:void 0,highlight:x,characterSpacing:i,rightToLeft:d?.attrs?.rtl===!0||void 0};return p?.attrs?.href?new n.Mf2({children:[new n.NTc({...m,style:"Hyperlink"})],link:p.attrs.href}):new n.NTc(m)}function tu(t){let e={text:"",break:1};if(t)for(let r of t)switch(r.type){case"bold":e.bold=!0;break;case"italic":e.italics=!0;break;case"underline":e.underline={};break;case"strike":e.strike=!0;break;case"textStyle":r.attrs?.color&&(e.color=r.attrs.color)}return new n.NTc(e)}function tf(t=[]){return t.flatMap(t=>"text"===t.type?[th(t)]:"hardBreak"===t.type?[tu(t.marks)]:[])}async function tp(t,e){let r,a;try{let n=t.attrs?.src||"";r=await (e?.handler??tl)(n);try{a=(0,i.L)(r)}catch{a={type:ta(n),width:void 0,height:void 0,orientation:void 0}}}catch(e){return console.warn("Failed to process image:",e),new n.J1n({type:"png",data:new Uint8Array(0),transformation:{width:100,height:100},altText:{name:t.attrs?.alt||"Failed to load image"}})}let o=function(t,e,r){if(t.attrs?.width!==void 0&&t.attrs?.width!==null){let e=t.attrs.width;if(!t.attrs.floating&&r){let t=void 0!==r?Q(r):void 0;if(t&&e>t)return t}return e}let n=void 0!==r?Q(r):void 0;return e?.width&&e?.height?to(e,n).width:n||tr}(t,a,e?.maxWidth),s={width:o,height:function(t,e,r,n){if(t.attrs?.height!==void 0&&t.attrs?.height!==null){let e=t.attrs.height;if(!t.attrs.floating&&n&&t.attrs?.width){let r=void 0!==n?Q(n):void 0,i=t.attrs.width;if(r&&i>r)return Math.round(r/i*e)}return e}let i=void 0!==n?Q(n):void 0;return r?.width&&r?.height?to(r,i).height:Math.round(.75*e)}(t,o,a,e?.maxWidth)};t.attrs?.rotation!==void 0&&(s.rotation=t.attrs.rotation);let l=ta(t.attrs?.src||""),c={...e?.options,transformation:s,altText:{name:t.attrs?.alt||"",description:void 0,title:t.attrs?.title||void 0},...t.attrs?.floating&&{floating:t.attrs.floating},...t.attrs?.outline&&{outline:t.attrs.outline}};return new n.J1n("svg"===l?{...c,type:"svg",data:r,fallback:{type:"png",data:new Uint8Array(0)}}:{...c,type:l,data:r,...t.attrs?.crop&&{srcRect:t.attrs.crop}})}async function td(t,e){let{options:r,image:n}=e||{},i=[];for(let e of t.content||[])if("text"===e.type)i.push(th(e));else if("hardBreak"===e.type)i.push(tu(e.marks));else if("image"===e.type){let t=await tp(e,{maxWidth:n?.maxWidth,options:n?.options,handler:n?.handler});i.push(t)}let a={children:i};return r&&(a={...a,...r}),t.attrs&&(a=tc(a,t.attrs)),a}async function tx(t,e){let{options:r}=e,i=r?.cell?.paragraph??r?.row?.paragraph??{};r?.style&&(i={...i,style:r.style.id});let a=await Promise.allSettled((t.content||[]).map(t=>td(t,{options:i}))),o=a.map((t,e)=>({r:t,i:e})).filter(({r:t})=>"rejected"===t.status);if(o.length>0){let t=o.map(({i:t,r:e})=>`[cell paragraph ${t}]: ${e.reason}`);throw Error(`Failed to convert table cell paragraphs:
|
|
${t.join("\n")}`)}let s={children:a.map(t=>t.value).map(t=>new n.fzL(t)),...r?.cell?.run};if(t.attrs?.colspan&&t.attrs.colspan>1&&(s.columnSpan=t.attrs.colspan),t.attrs?.rowspan&&t.attrs.rowspan>1&&(s.rowSpan=t.attrs.rowspan),t.attrs?.colwidth!==null&&t.attrs?.colwidth!==void 0){let e=Array.isArray(t.attrs.colwidth)?t.attrs.colwidth[0]:t.attrs.colwidth;e&&e>0&&(s.width={size:Math.round(15*e),type:"dxa"})}t.attrs?.backgroundColor&&(s.shading={fill:t.attrs.backgroundColor.replace("#","")}),t.attrs?.verticalAlign&&(s.verticalAlign="middle"===t.attrs.verticalAlign?"center":t.attrs.verticalAlign);let l={},c=te(t.attrs?.borderTop);c&&(l.top=c);let h=te(t.attrs?.borderBottom);h&&(l.bottom=h);let u=te(t.attrs?.borderLeft);u&&(l.left=u);let f=te(t.attrs?.borderRight);return f&&(l.right=f),Object.keys(l).length>0&&(s.borders=l),t.attrs?.textDirection&&(s.textDirection=t.attrs.textDirection),new n.nA6(s)}async function tg(t,e){let{options:r}=e,i=r?.header?.paragraph??r?.cell?.paragraph??r?.row?.paragraph??{};r?.style&&(i={...i,style:r.style.id});let a=await Promise.allSettled((t.content||[]).map(t=>td(t,{options:i}))),o=a.map((t,e)=>({r:t,i:e})).filter(({r:t})=>"rejected"===t.status);if(o.length>0){let t=o.map(({i:t,r:e})=>`[header paragraph ${t}]: ${e.reason}`);throw Error(`Failed to convert table header paragraphs:
|
|
${t.join("\n")}`)}let s={children:a.map(t=>t.value).map(t=>new n.fzL(t)),...r?.header?.run};if(t.attrs?.colspan&&t.attrs.colspan>1&&(s.columnSpan=t.attrs.colspan),t.attrs?.rowspan&&t.attrs.rowspan>1&&(s.rowSpan=t.attrs.rowspan),t.attrs?.colwidth!==null&&t.attrs?.colwidth!==void 0){let e=Array.isArray(t.attrs.colwidth)?t.attrs.colwidth[0]:t.attrs.colwidth;e&&e>0&&(s.width={size:Math.round(15*e),type:"dxa"})}t.attrs?.backgroundColor&&(s.shading={fill:t.attrs.backgroundColor.replace("#","")}),t.attrs?.verticalAlign&&(s.verticalAlign="middle"===t.attrs.verticalAlign?"center":t.attrs.verticalAlign);let l={},c=te(t.attrs?.borderTop);c&&(l.top=c);let h=te(t.attrs?.borderBottom);h&&(l.bottom=h);let u=te(t.attrs?.borderLeft);u&&(l.left=u);let f=te(t.attrs?.borderRight);return f&&(l.right=f),Object.keys(l).length>0&&(s.borders=l),t.attrs?.textDirection&&(s.textDirection=t.attrs.textDirection),new n.nA6(s)}async function tb(t,e){let{options:r}=e,i=r?.row,a=await Promise.allSettled((t.content||[]).map(async t=>"tableCell"===t.type?await tx(t,e):"tableHeader"===t.type?await tg(t,e):null)),o=a.map((e,r)=>({r:e,i:r,type:t.content?.[r]?.type})).filter(({r:t})=>"rejected"===t.status);if(o.length>0){let t=o.map(({i:t,type:e,r})=>`[cell ${t}, type=${e}]: ${r.reason}`);throw Error(`Failed to convert table row cells:
|
|
${t.join("\n")}`)}let s=a.map(t=>t.value).filter(t=>void 0!==t),l=(()=>{if(!t.attrs?.rowHeight)return;let e=O(J(t.attrs.rowHeight));if(!(e<=0))return{rule:"exact"===t.attrs.rowHeightRule?"exact":"atLeast",value:e}})();return new n.Hjg({children:s,...i,...l&&{height:l},...t.attrs?.header&&{tableHeader:!0}})}async function tm(t,e){var r;let i,{options:a}=e,o=await Promise.allSettled((t.content||[]).map(t=>tb(t,e))),s=o.map((t,e)=>({r:t,i:e})).filter(({r:t})=>"rejected"===t.status);if(s.length>0){let t=s.map(({i:t,r:e})=>`[row ${t}]: ${e.reason}`);throw Error(`Failed to convert table rows:
|
|
${t.join("\n")}`)}let l={rows:o.map(t=>t.value),...a?.style?.id&&{style:a.style.id},...a?.run};if(r=l,l=(i={top:t.attrs?.marginTop??void 0,bottom:t.attrs?.marginBottom??void 0,left:t.attrs?.marginLeft??void 0,right:t.attrs?.marginRight??void 0}).top||i.bottom||i.left||i.right?{...r,margins:i}:r,t.attrs?.layout){let e={autofit:n.tUz.AUTOFIT,fixed:n.tUz.FIXED}[t.attrs.layout];e&&(l={...l,layout:e})}if(t.attrs?.alignment){let e={left:n.Yus.LEFT,center:n.Yus.CENTER,right:n.Yus.RIGHT}[t.attrs.alignment];e&&(l={...l,alignment:e})}return t.attrs?.cellSpacing&&(l={...l,cellSpacing:{value:t.attrs.cellSpacing,type:"dxa"}}),new n.XIK(l)}async function ty(t,e){if(!t.content||0===t.content.length)return{};let r=t.content[0];return"paragraph"===r.type?await td(r,{options:e.options}):{}}async function tw(t,e){let{listType:r}=e;if(!t.content)return[];let n=[],i="bullet"===r?{numbering:{reference:"bullet-list",level:0}}:{numbering:{reference:"ordered-list",level:0},start:t.attrs?.start||1},a=i.numbering.reference;for(let o of("ordered"===r&&i.start&&1!==i.start&&(a=`ordered-list-start-${i.start}`),t.content))if("listItem"===o.type){let t=await ty(o,{options:!1===e.numbering?void 0:{numbering:{reference:a,level:0}}});n.push(t)}return n}function tv(t){if(!t.content||0===t.content.length)return{};let e=t.content[0];if("paragraph"===e.type){let r=t.attrs?.checked?"☑ ":"☐ ",i=e.content?.flatMap(t=>"text"===t.type?th(t):"hardBreak"===t.type?tu(t.marks):[])||[];return{children:[new n.NTc({text:r}),...i]}}return{}}async function tk(t,e){var r;let i,a,{title:o,subject:s,creator:l,keywords:c,description:h,lastModifiedBy:u,revision:f,styles:p,tableOfContents:d,sections:x,fonts:g,hyphenation:b,compatibility:m,customProperties:y,evenAndOddHeaderAndFooters:w,defaultTabStop:v,outputType:k}=e,_=await t_(t,{options:e}),F=d?new n.MBq(d.title,{...d.run}):null,S=(r=t,i=new Set,!function t(e){if("orderedList"===e.type&&e.attrs?.start&&i.add(e.attrs.start),e.content)for(let r of e.content)t(r)}(r),a=[{reference:"bullet-list",levels:[{level:0,format:n.sQw.BULLET,text:"•",alignment:n.Yus.START,style:{paragraph:{indent:{left:(0,n.PBP)(.5),hanging:(0,n.PBP)(.25)}}}}]},tE(1)],i.forEach(t=>{1!==t&&a.push(tE(t))}),{config:a}),A=[];e.image?.style&&A.push(e.image.style),e.table?.style&&A.push(e.table.style),e.code?.style&&A.push(e.code.style);let E=p?{...p,...A.length>0&&{paragraphStyles:[...p.paragraphStyles||[],...A]}}:{},T=new n.yoT({sections:x?x.map((t,e)=>{let r=[];return 0===e&&F&&r.push(F),0===e&&r.push(..._),{...t,...r.length>0?{children:r}:{}}}):[{children:F?[F,..._]:_}],title:o||"Document",subject:s||"",creator:l||"",keywords:c||"",description:h||"",lastModifiedBy:u||"",revision:f||1,styles:E,...!1!==e.numbering&&{numbering:S},...g&&g.length>0&&{fonts:g},...b&&{hyphenation:b},...m&&{compatibility:m},...y&&y.length>0&&{customProperties:y},...void 0!==w&&{evenAndOddHeaderAndFooters:w},...void 0!==v&&{defaultTabStop:v}});return n.ND6.pack(T,k||"arraybuffer")}async function t_(t,e){if(!t||!Array.isArray(t.content))return[];let r=function(t){if(!t?.sections?.length)return P(8306);let e=t.sections[0];if(!e.properties?.page)return P(8306);let r=e.properties.page,n=11906;if(r.size?.width){let t=r.size.width;n="number"==typeof t?t:Math.round(1440*K(t))}let i=r.margin;return Math.max(P(n-tt(i?.left,1800)-tt(i?.right,1800)),96)}(e.options),i=await Promise.allSettled(t.content.map(t=>tF(t,e.options,r))),a=i.map((e,r)=>({result:e,index:r,type:t.content?.[r]?.type})).filter(({result:t})=>"rejected"===t.status);if(a.length>0){let t=a.map(({index:t,type:e,result:r})=>`[index=${t}, type=${e}]: ${r.reason}`);throw Error(`Failed to convert document nodes:
|
|
${t.join("\n")}`)}let o=i.map(t=>t.value),s=[];for(let e=0;e<o.length;e++){let r=o[e],i=t.content[e];Array.isArray(r)?s.push(...r):r&&(s.push(r),"table"===i.type&&s.length>=2&&s[s.length-2]instanceof n.XIK&&s.push(new n.fzL({})))}return s}async function tF(t,e,r){if(!t||!t.type)return null;let i=await tS(t,e,r);if(i instanceof n.XIK)return i;if(Array.isArray(i)){let r=tT(t.type,e);return i.map(t=>new n.fzL(r?tL(t,r):t))}let a=tT(t.type,e);return(!a&&"paragraph"===t.type&&t.content&&t.content.length>0&&t.content.every(t=>"image"===t.type||"text"===t.type&&!t.text?.trim()||"hardBreak"===t.type)&&t.content.some(t=>"image"===t.type)&&(a=e.image?.style?.id),a)?tj(tL(i,a)):tj(i)}async function tS(t,e,r){switch(t.type){case"paragraph":return await td(t,{image:{maxWidth:r,options:e.image?.run,handler:e.image?.handler}});case"heading":let i,a;return i=t?.attrs?.level,a={children:tf(t.content).filter(t=>void 0!==t),heading:({1:n.Fmo.HEADING_1,2:n.Fmo.HEADING_2,3:n.Fmo.HEADING_3,4:n.Fmo.HEADING_4,5:n.Fmo.HEADING_5,6:n.Fmo.HEADING_6})[i]},t.attrs&&(a=tc(a,t.attrs)),a;case"blockquote":return t.content?t.content.map(t=>"paragraph"===t.type?{children:t.content?.flatMap(t=>"text"===t.type?th(t):"hardBreak"===t.type?tu(t.marks):[])||[],indent:{left:720},border:{left:{style:"single"}}}:{}):[];case"codeBlock":var o,s;if(!t.content||0===t.content.length)return{children:[new n.NTc({text:"",font:I})]};let l=t.content.flatMap(t=>"text"===t.type?th(t):[]);return{children:l.length>0?l:[new n.NTc({text:"",font:I})]};case"image":return tL({children:[await tp(t,{maxWidth:r,options:e.image?.run,handler:e.image?.handler})]},tT("image",e));case"table":return await tm(t,{options:e.table});case"bulletList":return await tw(t,{listType:"bullet",numbering:!1!==e.numbering});case"orderedList":return await tw(t,{listType:"ordered",numbering:!1!==e.numbering});case"taskList":return t.content&&0!==t.content.length?t.content.filter(t=>"taskItem"===t.type).map(t=>tv(t)):[];case"taskItem":return tv(t);case"hardBreak":return{children:[tu()]};case"horizontalRule":return o={options:e.horizontalRule},{children:[new n.bjD],...o.options?.paragraph};case"details":return await tA(t,e,r);case"detailsSummary":return s={options:e.details},{children:tf(t.content||[]).filter(t=>void 0!==t),...s.options?.summary?.paragraph};default:return{children:[new n.NTc({text:`[Unsupported: ${t.type}]`})]}}}async function tA(t,e,r){let n=[];if(t.content)for(let i of t.content){let t=await tF(i,e,r);Array.isArray(t)?n.push(...t):t&&n.push(t)}return n}let tE=t=>({reference:t&&1!==t?`ordered-list-start-${t}`:"ordered-list",levels:[{level:0,format:n.sQw.DECIMAL,text:"%1.",alignment:n.Yus.START,start:t??1,style:{paragraph:{indent:{left:(0,n.PBP)(.5),hanging:(0,n.PBP)(.25)}}}}]});function tT(t,e){return({codeBlock:e.code?.style?.id,image:e.image?.style?.id})[t]}function tL(t,e){return e?{...t,style:e}:t}function tj(t){return t instanceof n.XIK?t:new n.fzL(t)}},11387:(t,e,r)=>{"use strict";var n=r(45063),i=r(57374);function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=a,a.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},a.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},a.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(a=8,n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0;a<this.padLength;a++)n[i++]=0;return n}},16807:(t,e,r)=>{"use strict";var n=r(45063),i=r(80866);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[0xc1059ed8,0x367cd507,0x3070dd17,0xf70e5939,0xffc00b31,0x68581511,0x64f98fa7,0xbefa4fa4]}n.inherits(a,i),t.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},24231:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},25616:(t,e,r)=>{"use strict";var n=r(45063),i=r(11387),a=r(34132),o=n.rotl32,s=n.sum32,l=n.sum32_5,c=a.ft_1,h=i.BlockHash,u=[0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6];function f(){if(!(this instanceof f))return new f;h.call(this),this.h=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0],this.W=Array(80)}n.inherits(f,h),t.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=o(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],a=this.h[1],h=this.h[2],f=this.h[3],p=this.h[4];for(n=0;n<r.length;n++){var d=~~(n/20),x=l(o(i,5),c(d,a,h,f),p,r[n],u[d]);p=f,f=h,h=o(a,30),a=i,i=x}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],a),this.h[2]=s(this.h[2],h),this.h[3]=s(this.h[3],f),this.h[4]=s(this.h[4],p)},f.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},25861:(t,e,r)=>{"use strict";var n=r(45063),i=r(11387),a=n.rotl32,o=n.sum32,s=n.sum32_3,l=n.sum32_4,c=i.BlockHash;function h(){if(!(this instanceof h))return new h;c.call(this),this.h=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0],this.endian="little"}function u(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}n.inherits(h,c),e.ripemd160=h,h.blockSize=512,h.outSize=160,h.hmacStrength=192,h.padLength=64,h.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],h=this.h[4],g=r,b=n,m=i,y=c,w=h,v=0;v<80;v++){var k,_,F=o(a(l(r,u(v,n,i,c),t[f[v]+e],(k=v)<=15?0:k<=31?0x5a827999:k<=47?0x6ed9eba1:k<=63?0x8f1bbcdc:0xa953fd4e),d[v]),h);r=h,h=c,c=a(i,10),i=n,n=F,F=o(a(l(g,u(79-v,b,m,y),t[p[v]+e],(_=v)<=15?0x50a28be6:_<=31?0x5c4dd124:_<=47?0x6d703ef3:0x7a6d76e9*!!(_<=63)),x[v]),w),g=w,w=y,y=a(m,10),m=b,b=F}F=s(this.h[1],i,y),this.h[1]=s(this.h[2],c,w),this.h[2]=s(this.h[3],h,g),this.h[3]=s(this.h[4],r,b),this.h[4]=s(this.h[0],n,m),this.h[0]=F},h.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],x=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},34132:(t,e,r)=>{"use strict";var n=r(45063).rotr32;function i(t,e,r){return t&e^t&r^e&r}e.ft_1=function(t,e,r,n){var a;return 0===t?(a=e)&r^~a&n:1===t||3===t?e^r^n:2===t?i(e,r,n):void 0},e.ch32=function(t,e,r){return t&e^~t&r},e.maj32=i,e.p32=function(t,e,r){return t^e^r},e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},45063:(t,e,r)=>{"use strict";var n=r(57374);function i(t){return(t>>>24|t>>>8&65280|t<<8&0xff0000|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function o(t){if(7===t.length)return"0"+t;if(6===t.length)return"00"+t;if(5===t.length)return"000"+t;if(4===t.length)return"0000"+t;if(3===t.length)return"00000"+t;else if(2===t.length)return"000000"+t;else if(1===t.length)return"0000000"+t;else return t}e.inherits=r(24231),e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/ig,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var a,o,s=t.charCodeAt(i);s<128?r[n++]=s:(s<2048?r[n++]=s>>6|192:((a=t,o=i,(64512&a.charCodeAt(o))!=55296||o<0||o+1>=a.length?1:(64512&a.charCodeAt(o+1))!=56320)?r[n++]=s>>12|224:(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128),r[n++]=s>>6&63|128),r[n++]=63&s|128)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=a(t[r].toString(16));return e},e.htonl=i,e.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var a=t[n];"little"===e&&(a=i(a)),r+=o(a.toString(16))}return r},e.zero2=a,e.zero8=o,e.join32=function(t,e,r,i){var a,o=r-e;n(o%4==0);for(var s=Array(o/4),l=0,c=e;l<s.length;l++,c+=4)a="big"===i?t[c]<<24|t[c+1]<<16|t[c+2]<<8|t[c+3]:t[c+3]<<24|t[c+2]<<16|t[c+1]<<8|t[c],s[l]=a>>>0;return s},e.split32=function(t,e){for(var r=Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var a=t[n];"big"===e?(r[i]=a>>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],a=n+t[e+1]>>>0;t[e]=+(a<n)+r+i>>>0,t[e+1]=a},e.sum64_hi=function(t,e,r,n){return+(e+n>>>0<e)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,a,o,s){var l,c=e;return t+r+i+o+(l=0+ +((c=c+n>>>0)<e)+ +((c=c+a>>>0)<a)+ +((c=c+s>>>0)<s))>>>0},e.sum64_4_lo=function(t,e,r,n,i,a,o,s){return e+n+a+s>>>0},e.sum64_5_hi=function(t,e,r,n,i,a,o,s,l,c){var h,u=e;return t+r+i+o+l+(h=0+ +((u=u+n>>>0)<e)+ +((u=u+a>>>0)<a)+ +((u=u+s>>>0)<s)+ +((u=u+c>>>0)<c))>>>0},e.sum64_5_lo=function(t,e,r,n,i,a,o,s,l,c){return e+n+a+s+c>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},55813:(t,e,r)=>{e.utils=r(45063),e.common=r(11387),e.sha=r(67032),e.ripemd=r(25861),e.hmac=r(4057),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160},57374:t=>{function e(t,e){if(!t)throw Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw Error(r||"Assertion failed: "+t+" != "+e)}},65977:(t,e,r)=>{"use strict";r.d(e,{A:()=>i,d:()=>n});let n=(t,e=21)=>(r=e)=>{let n="",i=0|r;for(;i--;)n+=t[Math.random()*t.length|0];return n},i=(t=21)=>{let e="",r=0|t;for(;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e}},67032:(t,e,r)=>{"use strict";e.sha1=r(25616),e.sha224=r(16807),e.sha256=r(80866),e.sha384=r(90378),e.sha512=r(82315)},80866:(t,e,r)=>{"use strict";var n=r(45063),i=r(11387),a=r(34132),o=r(57374),s=n.sum32,l=n.sum32_4,c=n.sum32_5,h=a.ch32,u=a.maj32,f=a.s0_256,p=a.s1_256,d=a.g0_256,x=a.g1_256,g=i.BlockHash,b=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2];function m(){if(!(this instanceof m))return new m;g.call(this),this.h=[0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19],this.k=b,this.W=Array(64)}n.inherits(m,g),t.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=l(x(r[n-2]),r[n-7],d(r[n-15]),r[n-16]);var i=this.h[0],a=this.h[1],g=this.h[2],b=this.h[3],m=this.h[4],y=this.h[5],w=this.h[6],v=this.h[7];for(o(this.k.length===r.length),n=0;n<r.length;n++){var k=c(v,p(m),h(m,y,w),this.k[n],r[n]),_=s(f(i),u(i,a,g));v=w,w=y,y=m,m=s(b,k),b=g,g=a,a=i,i=s(k,_)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],a),this.h[2]=s(this.h[2],g),this.h[3]=s(this.h[3],b),this.h[4]=s(this.h[4],m),this.h[5]=s(this.h[5],y),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],v)},m.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},82315:(t,e,r)=>{"use strict";var n=r(45063),i=r(11387),a=r(57374),o=n.rotr64_hi,s=n.rotr64_lo,l=n.shr64_hi,c=n.shr64_lo,h=n.sum64,u=n.sum64_hi,f=n.sum64_lo,p=n.sum64_4_hi,d=n.sum64_4_lo,x=n.sum64_5_hi,g=n.sum64_5_lo,b=i.BlockHash,m=[0x428a2f98,0xd728ae22,0x71374491,0x23ef65cd,0xb5c0fbcf,0xec4d3b2f,0xe9b5dba5,0x8189dbbc,0x3956c25b,0xf348b538,0x59f111f1,0xb605d019,0x923f82a4,0xaf194f9b,0xab1c5ed5,0xda6d8118,0xd807aa98,0xa3030242,0x12835b01,0x45706fbe,0x243185be,0x4ee4b28c,0x550c7dc3,0xd5ffb4e2,0x72be5d74,0xf27b896f,0x80deb1fe,0x3b1696b1,0x9bdc06a7,0x25c71235,0xc19bf174,0xcf692694,0xe49b69c1,0x9ef14ad2,0xefbe4786,0x384f25e3,0xfc19dc6,0x8b8cd5b5,0x240ca1cc,0x77ac9c65,0x2de92c6f,0x592b0275,0x4a7484aa,0x6ea6e483,0x5cb0a9dc,0xbd41fbd4,0x76f988da,0x831153b5,0x983e5152,0xee66dfab,0xa831c66d,0x2db43210,0xb00327c8,0x98fb213f,0xbf597fc7,0xbeef0ee4,0xc6e00bf3,0x3da88fc2,0xd5a79147,0x930aa725,0x6ca6351,0xe003826f,0x14292967,0xa0e6e70,0x27b70a85,0x46d22ffc,0x2e1b2138,0x5c26c926,0x4d2c6dfc,0x5ac42aed,0x53380d13,0x9d95b3df,0x650a7354,0x8baf63de,0x766a0abb,0x3c77b2a8,0x81c2c92e,0x47edaee6,0x92722c85,0x1482353b,0xa2bfe8a1,0x4cf10364,0xa81a664b,0xbc423001,0xc24b8b70,0xd0f89791,0xc76c51a3,0x654be30,0xd192e819,0xd6ef5218,0xd6990624,0x5565a910,0xf40e3585,0x5771202a,0x106aa070,0x32bbd1b8,0x19a4c116,0xb8d2d0c8,0x1e376c08,0x5141ab53,0x2748774c,0xdf8eeb99,0x34b0bcb5,0xe19b48a8,0x391c0cb3,0xc5c95a63,0x4ed8aa4a,0xe3418acb,0x5b9cca4f,0x7763e373,0x682e6ff3,0xd6b2b8a3,0x748f82ee,0x5defb2fc,0x78a5636f,0x43172f60,0x84c87814,0xa1f0ab72,0x8cc70208,0x1a6439ec,0x90befffa,0x23631e28,0xa4506ceb,0xde82bde9,0xbef9a3f7,0xb2c67915,0xc67178f2,0xe372532b,0xca273ece,0xea26619c,0xd186b8c7,0x21c0c207,0xeada7dd6,0xcde0eb1e,0xf57d4f7f,0xee6ed178,0x6f067aa,0x72176fba,0xa637dc5,0xa2c898a6,0x113f9804,0xbef90dae,0x1b710b35,0x131c471b,0x28db77f5,0x23047d84,0x32caab7b,0x40c72493,0x3c9ebe0a,0x15c9bebc,0x431d67c4,0x9c100d4c,0x4cc5d4be,0xcb3e42b6,0x597f299c,0xfc657e2a,0x5fcb6fab,0x3ad6faec,0x6c44198c,0x4a475817];function y(){if(!(this instanceof y))return new y;b.call(this),this.h=[0x6a09e667,0xf3bcc908,0xbb67ae85,0x84caa73b,0x3c6ef372,0xfe94f82b,0xa54ff53a,0x5f1d36f1,0x510e527f,0xade682d1,0x9b05688c,0x2b3e6c1f,0x1f83d9ab,0xfb41bd6b,0x5be0cd19,0x137e2179],this.k=m,this.W=Array(160)}n.inherits(y,b),t.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=function(t,e){var r=o(t,e,19)^o(e,t,29)^l(t,e,6);return r<0&&(r+=0x100000000),r}(r[n-4],r[n-3]),a=function(t,e){var r=s(t,e,19)^s(e,t,29)^c(t,e,6);return r<0&&(r+=0x100000000),r}(r[n-4],r[n-3]),h=r[n-14],u=r[n-13],f=function(t,e){var r=o(t,e,1)^o(t,e,8)^l(t,e,7);return r<0&&(r+=0x100000000),r}(r[n-30],r[n-29]),x=function(t,e){var r=s(t,e,1)^s(t,e,8)^c(t,e,7);return r<0&&(r+=0x100000000),r}(r[n-30],r[n-29]),g=r[n-32],b=r[n-31];r[n]=p(i,a,h,u,f,x,g,b),r[n+1]=d(i,a,h,u,f,x,g,b)}},y.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],l=this.h[2],c=this.h[3],p=this.h[4],d=this.h[5],b=this.h[6],m=this.h[7],y=this.h[8],w=this.h[9],v=this.h[10],k=this.h[11],_=this.h[12],F=this.h[13],S=this.h[14],A=this.h[15];a(this.k.length===r.length);for(var E=0;E<r.length;E+=2){var T=S,L=A,j=function(t,e){var r=o(t,e,14)^o(t,e,18)^o(e,t,9);return r<0&&(r+=0x100000000),r}(y,w),z=function(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r<0&&(r+=0x100000000),r}(y,w),B=function(t,e,r){var n=t&e^~t&r;return n<0&&(n+=0x100000000),n}(y,v,_),C=function(t,e,r){var n=t&e^~t&r;return n<0&&(n+=0x100000000),n}(w,k,F),$=this.k[E],R=this.k[E+1],H=r[E],D=r[E+1],N=x(T,L,j,z,B,C,$,R,H,D),q=g(T,L,j,z,B,C,$,R,H,D);T=function(t,e){var r=o(t,e,28)^o(e,t,2)^o(e,t,7);return r<0&&(r+=0x100000000),r}(n,i),L=function(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=0x100000000),r}(n,i);var M=u(T,L,j=function(t,e,r){var n=t&e^t&r^e&r;return n<0&&(n+=0x100000000),n}(n,l,p),z=function(t,e,r){var n=t&e^t&r^e&r;return n<0&&(n+=0x100000000),n}(i,c,d)),I=f(T,L,j,z);S=_,A=F,_=v,F=k,v=y,k=w,y=u(b,m,N,q),w=f(m,m,N,q),b=p,m=d,p=l,d=c,l=n,c=i,n=u(N,q,M,I),i=f(N,q,M,I)}h(this.h,0,n,i),h(this.h,2,l,c),h(this.h,4,p,d),h(this.h,6,b,m),h(this.h,8,y,w),h(this.h,10,v,k),h(this.h,12,_,F),h(this.h,14,S,A)},y.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},90378:(t,e,r)=>{"use strict";var n=r(45063),i=r(82315);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[0xcbbb9d5d,0xc1059ed8,0x629a292a,0x367cd507,0x9159015a,0x3070dd17,0x152fecd8,0xf70e5939,0x67332667,0xffc00b31,0x8eb44a87,0x68581511,0xdb0c2e0d,0x64f98fa7,0x47b5481d,0xbefa4fa4]}n.inherits(a,i),t.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}}}]); |